Struct tantivy_common::TinySet
source · pub struct TinySet(/* private fields */);
Implementations§
source§impl TinySet
impl TinySet
pub fn serialize<T: Write>(&self, writer: &mut T) -> Result<()>
pub fn into_bytes(self) -> [u8; 8]
pub fn deserialize(data: [u8; 8]) -> Self
pub fn clear(&mut self)
sourcepub fn singleton(el: u32) -> TinySet
pub fn singleton(el: u32) -> TinySet
Creates a new TinySet
containing only one element
within [0; 64[
sourcepub fn insert_mut(&mut self, el: u32) -> bool
pub fn insert_mut(&mut self, el: u32) -> bool
Insert a new element within [0..64)
returns true if the set changed
sourcepub fn remove_mut(&mut self, el: u32) -> bool
pub fn remove_mut(&mut self, el: u32) -> bool
Remove a element within [0..64)
returns true if the set changed
sourcepub fn pop_lowest(&mut self) -> Option<u32>
pub fn pop_lowest(&mut self) -> Option<u32>
Returns the lowest element in the TinySet
and removes it.
sourcepub fn range_lower(upper_bound: u32) -> TinySet
pub fn range_lower(upper_bound: u32) -> TinySet
Returns a TinySet
than contains all values up
to limit excluded.
The limit is assumed to be strictly lower than 64.
sourcepub fn range_greater_or_equal(from_included: u32) -> TinySet
pub fn range_greater_or_equal(from_included: u32) -> TinySet
Returns a TinySet
that contains all values greater
or equal to the given limit, included. (and up to 63)
The limit is assumed to be strictly lower than 64.
Trait Implementations§
source§impl IntoIterator for TinySet
impl IntoIterator for TinySet
source§impl PartialEq for TinySet
impl PartialEq for TinySet
impl Copy for TinySet
impl Eq for TinySet
impl StructuralPartialEq for TinySet
Auto Trait Implementations§
impl Freeze for TinySet
impl RefUnwindSafe for TinySet
impl Send for TinySet
impl Sync for TinySet
impl Unpin for TinySet
impl UnwindSafe for TinySet
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