[][src]Struct golomb_set::Gcs

pub struct Gcs<D: Digest> { /* fields omitted */ }

A packed Golomb-coded Set.

Methods

impl<D: Digest> Gcs<D>[src]

pub fn from_reader<R: Read>(
    reader: &mut R,
    n: usize,
    p: u8
) -> Result<Self, Error>
[src]

Read a packed Gcs from any Reader.

Errors

  • If there is an error reading data from reader.

pub fn write<W: Write>(&self, writer: &mut W) -> Result<(), Error>[src]

Writes a packed Gcs to a Writer.

Errors

  • If there is an error writing data to writer.

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.

Errors

  • If the inner data is not a valid Golomb-Rice encoding.

pub fn unpack(&self) -> UnpackedGcs<D>[src]

Unpacks a Gcs into an UnpackedGcs.

This will will increase query performance, but also increase the memory footprint.

Errors

  • If the inner data is not a valid Golomb-Rice encoding.

Trait Implementations

impl<D: PartialEq + Digest> PartialEq<Gcs<D>> for Gcs<D>[src]

impl<D: Clone + Digest> Clone for Gcs<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 Gcs<D>[src]

Auto Trait Implementations

impl<D> Send for Gcs<D> where
    D: Send

impl<D> Unpin for Gcs<D> where
    D: Unpin

impl<D> Sync for Gcs<D> where
    D: Sync

impl<D> UnwindSafe for Gcs<D> where
    D: UnwindSafe

impl<D> RefUnwindSafe for Gcs<D> where
    D: RefUnwindSafe

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self