pub struct ApproxPos {
pub pos: usize,
pub lo: usize,
pub hi: usize,
}Expand description
Approximate position returned by index search.
When searching for a key, the index returns an approximate position along with guaranteed bounds where the key must exist (if present).
The actual key position (if it exists) is guaranteed to be in [lo, hi).
Fields§
§pos: usizeThe predicted position of the key.
lo: usizeThe lowest index guaranteed to contain the key if it exists.
hi: usizeOne past the highest index guaranteed to contain the key if it exists.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ApproxPos
impl<'de> Deserialize<'de> for ApproxPos
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for ApproxPos
Auto Trait Implementations§
impl Freeze for ApproxPos
impl RefUnwindSafe for ApproxPos
impl Send for ApproxPos
impl Sync for ApproxPos
impl Unpin for ApproxPos
impl UnwindSafe for ApproxPos
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more