Struct grove::locators::ByKey [−][src]
pub struct ByKey<T>(pub T);
Expand description
This struct says you want your locator to be based on your values’ keys, through the
data::Keyed
trait.
For example, a ByKey(3..9)
locator will accept
elements with keys in the range 3..9
. Of course, this is a legal locator only if
the elements are sorted by their keys.
Tuple Fields
0: T
Trait Implementations
Can’t be an instance for ByKey<D::Value::Key>
directly, because the Key
might itself
be a range type, and so it would conflict with the other implementations.
Locator instance for ByKey
<
std::ops::RangeFull
>
.
Locator instance for ByKey
<std::ops::Range<D::Value::Key>>
representing searching by a key.
Locator instance for ByKey
<std::ops::RangeInclusive<D::Value::Key>>
representing searching by a key.
Do not use with ranges that have been iterated on to exhaustion.
Locator instance for ByKey
<
std::ops::RangeFrom
<D::Value::Key>>
representing an index range.
Locator instance for ByKey
<std::ops::RangeTo<D::Value::Key>>
representing searching by a key.
Locator instance for ByKey
<std::ops::RangeToInclusive<D::Value::Key>>
representing searching by a key.
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<T> RefUnwindSafe for ByKey<T> where
T: RefUnwindSafe,
impl<T> UnwindSafe for ByKey<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Creates the summary of a single value.
Creates the summary of a single value.