[−][src]Struct golomb_set::UnpackedGcs
An unpacked Golomb Coded Set.
Methods
impl<D: Digest> UnpackedGcs<D>
[src]
pub fn new(n: usize, p: u8) -> Self
[src]
Creates a new UnpackedGcs
from n
and p
, where 1/2^p
is the probability
of a false positive when n items have been inserted into the set.
pub fn insert_from_reader<R: Read>(&mut self, reader: R) -> Result<(), Error>
[src]
Copies data from the reader and inserts into into the set.
Errors
- If there is an error reading data from
reader
. - If more than
n
items have been inserted.
pub fn insert<A: AsRef<[u8]>>(&mut self, input: A) -> Result<(), Error>
[src]
Adds an entry to the set, and returns an error if more than N items are added.
Errors
- If more than
n
items have been inserted.
pub fn contains<A: AsRef<[u8]>>(&self, input: A) -> bool
[src]
Returns whether or not an input is contained in the set. If false the input is definitely not present, if true the input is probably present.
pub fn pack(&self) -> Gcs<D>
[src]
Packs an UnpackedGcs
into a Gcs
.
This will will reduce the memory footprint, but also reduce query performance.
Trait Implementations
impl<D: PartialEq + Digest> PartialEq<UnpackedGcs<D>> for UnpackedGcs<D>
[src]
fn eq(&self, other: &UnpackedGcs<D>) -> bool
[src]
fn ne(&self, other: &UnpackedGcs<D>) -> bool
[src]
impl<D: Clone + Digest> Clone for UnpackedGcs<D>
[src]
fn clone(&self) -> UnpackedGcs<D>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl<D: Debug + Digest> Debug for UnpackedGcs<D>
[src]
Auto Trait Implementations
impl<D> Send for UnpackedGcs<D> where
D: Send,
D: Send,
impl<D> Unpin for UnpackedGcs<D> where
D: Unpin,
D: Unpin,
impl<D> Sync for UnpackedGcs<D> where
D: Sync,
D: Sync,
impl<D> UnwindSafe for UnpackedGcs<D> where
D: UnwindSafe,
D: UnwindSafe,
impl<D> RefUnwindSafe for UnpackedGcs<D> where
D: RefUnwindSafe,
D: RefUnwindSafe,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self