pub struct Splinter { /* private fields */ }Expand description
An owned, compressed bitmap for u32 keys
Implementations§
Source§impl Splinter
impl Splinter
pub fn from_slice(data: &[u32]) -> Self
pub fn from_bytes<T: AsRef<[u8]>>(data: T) -> Result<Self, Culprit<DecodeErr>>
Sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
Computes the serialized size of this Splinter
pub fn serialize<B: BufMut>(&self, out: &mut B) -> usize
pub fn serialize_to_bytes(&self) -> Bytes
pub fn serialize_to_splinter_ref(&self) -> SplinterRef<Bytes>
Trait Implementations§
Source§impl<B: AsRef<[u8]>> From<CowSplinter<B>> for Splinter
impl<B: AsRef<[u8]>> From<CowSplinter<B>> for Splinter
Source§fn from(cow_splinter: CowSplinter<B>) -> Self
fn from(cow_splinter: CowSplinter<B>) -> Self
Converts to this type from the input type.
Source§impl<B> From<Splinter> for CowSplinter<B>
impl<B> From<Splinter> for CowSplinter<B>
Source§impl<T: AsRef<[u8]>> From<SplinterRef<T>> for Splinter
impl<T: AsRef<[u8]>> From<SplinterRef<T>> for Splinter
Source§fn from(value: SplinterRef<T>) -> Self
fn from(value: SplinterRef<T>) -> Self
Converts to this type from the input type.
Source§impl<K: Into<u32>> FromIterator<K> for Splinter
impl<K: Into<u32>> FromIterator<K> for Splinter
Source§fn from_iter<T: IntoIterator<Item = K>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = K>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<T: AsRef<[u8]>> Intersection<Splinter> for CowSplinter<T>
impl<T: AsRef<[u8]>> Intersection<Splinter> for CowSplinter<T>
Source§impl<T: AsRef<[u8]>> Intersection<Splinter> for SplinterRef<T>
impl<T: AsRef<[u8]>> Intersection<Splinter> for SplinterRef<T>
Source§impl<T: AsRef<[u8]>> Intersection<SplinterRef<T>> for Splinter
impl<T: AsRef<[u8]>> Intersection<SplinterRef<T>> for Splinter
type Output = Splinter
Source§fn intersection(&self, rhs: &SplinterRef<T>) -> Self::Output
fn intersection(&self, rhs: &SplinterRef<T>) -> Self::Output
Returns the intersection between self and other
Source§impl Intersection for Splinter
impl Intersection for Splinter
Source§impl<T: AsRef<[u8]>> Merge<SplinterRef<T>> for Splinter
impl<T: AsRef<[u8]>> Merge<SplinterRef<T>> for Splinter
Source§fn merge(&mut self, rhs: &SplinterRef<T>)
fn merge(&mut self, rhs: &SplinterRef<T>)
Merges rhs into self
Source§impl SplinterRead for Splinter
impl SplinterRead for Splinter
Source§fn contains(&self, key: u32) -> bool
fn contains(&self, key: u32) -> bool
Returns
true if the Splinter contains the given key. Read moreSource§fn cardinality(&self) -> usize
fn cardinality(&self) -> usize
Calculates the total number of values stored in the Splinter. Read more
Source§impl SplinterWrite for Splinter
impl SplinterWrite for Splinter
Auto Trait Implementations§
impl Freeze for Splinter
impl RefUnwindSafe for Splinter
impl Send for Splinter
impl Sync for Splinter
impl Unpin for Splinter
impl UnwindSafe for Splinter
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