[][src]Struct orga::store::Prefixed

pub struct Prefixed<S> { /* fields omitted */ }

A Store which wraps another Store and appends a prefix byte to the key for every read or write.

This can be useful to create a hierarchy of data within a single store - effectively namespacing the keys to prevent key conflicts.

Implementations

impl<S> Prefixed<S>[src]

pub fn new(store: S, prefix: u8) -> Self[src]

Constructs a Prefixed by wrapping the given store and prepending keys with the given prefix for all operations.

Trait Implementations

impl<R: Read> Read for Prefixed<R>[src]

impl<W: Write> Write for Prefixed<W>[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for Prefixed<S> where
    S: RefUnwindSafe

impl<S> Send for Prefixed<S> where
    S: Send

impl<S> Sync for Prefixed<S> where
    S: Sync

impl<S> Terminated for Prefixed<S> where
    S: Terminated

impl<S> Unpin for Prefixed<S> where
    S: Unpin

impl<S> UnwindSafe for Prefixed<S> where
    S: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<S, T> Read for T where
    S: Read,
    T: Deref<Target = S>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<S> Store for S where
    S: Read + Write
[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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<S, T> Write for T where
    S: Write,
    T: DerefMut<Target = S>, 
[src]