Struct tantivy::schema::Facet [−][src]
pub struct Facet(_);
Expand description
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
.
Implementations
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.
Creates a Facet
from its binary representation.
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 /
.
Returns a Facet
from an iterator over the different
steps of the facet path.
The steps are expected to be unescaped.
Returns true
if other is a subfacet of self
.
This function is the inverse of Facet::from(&str).
Trait Implementations
Deserialize this value from the given Serde deserializer. Read more
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for Facet
impl UnwindSafe for Facet
Blanket Implementations
Mutably borrows from an owned value. Read more
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more