Enum lmdb_zero::MaybeOwned [] [src]

pub enum MaybeOwned<'a, T: 'a> {
    Owned(T),
    Borrowed(&'a mut T),
}

A mutable value which is either owned or borrowed from an owning context.

This is very different from Cow in that one can mutate the shared reference but cannot take ownership.

Variants

Trait Implementations

impl<'a, T: Debug + 'a> Debug for MaybeOwned<'a, T>
[src]

[src]

Formats the value using the given formatter. Read more

impl<'a, T: 'a> Deref for MaybeOwned<'a, T>
[src]

The resulting type after dereferencing.

Important traits for &'a mut W
[src]

Dereferences the value.

impl<'a, T: 'a> DerefMut for MaybeOwned<'a, T>
[src]

Important traits for &'a mut W
[src]

Mutably dereferences the value.

Auto Trait Implementations

impl<'a, T> Send for MaybeOwned<'a, T> where
    T: Send

impl<'a, T> Sync for MaybeOwned<'a, T> where
    T: Sync