Struct tantivy::schema::Facet [] [src]

pub struct Facet(_);

A Facet represent a point in a given hierarchy.

They are typically represented similarly to a filepath. For instance, an e-commerce website could have a Facet for /electronics/tv_and_video/led_tv.

A document can be associated to any number of facets. The hierarchy implicitely imply that a document belonging to a facet also belongs to the ancestor of its facet. In the example above, /electronics/tv_and_video/ and /electronics.

Methods

impl Facet
[src]

[src]

Returns a new instance of the "root facet" Equivalent to /.

[src]

Returns true iff the facet is the root facet /.

Important traits for &'a [u8]
[src]

Returns a binary representation of the facet.

In this representation, 0u8 is used as a separator and the string parts of the facet are unescaped. (The first / is not encoded at all).

This representation has the benefit of making it possible to express "being a child of a given facet" as a range over the term ordinals.

[src]

Parse a text representation of a facet.

It is conceptually, if one of the steps of this path contains a / or a \, it should be escaped using an anti-slash /.

[src]

Returns a Facet from an iterator over the different steps of the facet path.

The steps are expected to be unescaped.

[src]

Returns true iff other is a subfacet of self.

Trait Implementations

impl Clone for Facet
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for Facet
[src]

impl Hash for Facet
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl PartialEq for Facet
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Ord for Facet
[src]

[src]

This method returns an Ordering between self and other. Read more

1.21.0
[src]

Compares and returns the maximum of two values. Read more

1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for Facet
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

[src]

This method tests less than (for self and other) and is used by the < operator. Read more

[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Borrow<[u8]> for Facet
[src]

Important traits for &'a [u8]
[src]

Immutably borrows from an owned value. Read more

impl<'a, T: ?Sized + AsRef<str>> From<&'a T> for Facet
[src]

[src]

Performs the conversion.

impl Display for Facet
[src]

[src]

Formats the value using the given formatter. Read more

impl Serialize for Facet
[src]

[src]

Serialize this value into the given Serde serializer. Read more

impl<'de> Deserialize<'de> for Facet
[src]

[src]

Deserialize this value from the given Serde deserializer. Read more

impl Debug for Facet
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a> From<Facet> for Value
[src]

[src]

Performs the conversion.