Enum matterdb::generic::GenericRawAccess[][src]

#[non_exhaustive]pub enum GenericRawAccess<'a> {
    Snapshot(&'a dyn Snapshot),
    OwnedSnapshot(Rc<dyn Snapshot>),
    Fork(&'a Fork),
    OwnedFork(Rc<Fork>),
    ReadonlyFork(ReadonlyFork<'a>),
    OwnedReadonlyFork(OwnedReadonlyFork),
}

Container for an arbitrary raw access. For Forks and Snapshots, this type provides both owned and borrowed variants.

GenericRawAccess implements RawAccess and RawAccessMut traits. The latter means that the mutable methods on indexes will panic in the run time if an immutable access (such as a Snapshot) is used as the base. The caller is advised to check mutability in advance with the help of is_mutable().

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Snapshot(&'a dyn Snapshot)

Borrowed snapshot.

OwnedSnapshot(Rc<dyn Snapshot>)

Owned snapshot.

Fork(&'a Fork)

Borrowed fork.

OwnedFork(Rc<Fork>)

Owned fork.

ReadonlyFork(ReadonlyFork<'a>)

Readonly fork.

OwnedReadonlyFork(OwnedReadonlyFork)

Owned readonly fork.

Implementations

impl GenericRawAccess<'_>[src]

pub fn is_mutable(&self) -> bool[src]

Checks if the underlying access is mutable.

Trait Implementations

impl AsReadonly for GenericRawAccess<'_>[src]

type Readonly = Self

Readonly version of the access.

impl<'a> Clone for GenericRawAccess<'a>[src]

impl<'a> Debug for GenericRawAccess<'a>[src]

impl<'a> From<&'a (dyn Snapshot + 'static)> for GenericRawAccess<'a>[src]

impl<'a> From<&'a Fork> for GenericRawAccess<'a>[src]

impl From<Box<dyn Snapshot + 'static, Global>> for GenericRawAccess<'_>[src]

impl From<Fork> for GenericRawAccess<'_>[src]

impl From<OwnedReadonlyFork> for GenericRawAccess<'_>[src]

impl<'a> From<ReadonlyFork<'a>> for GenericRawAccess<'a>[src]

impl<'a> RawAccess for GenericRawAccess<'a>[src]

type Changes = GenericChanges<'a>

Type of the changes() that will be applied to the database.

impl RawAccessMut for GenericRawAccess<'_>[src]

Will panic in runtime if mutable methods are called on an inappropriate underlying access.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for GenericRawAccess<'a>

impl<'a> !Send for GenericRawAccess<'a>

impl<'a> !Sync for GenericRawAccess<'a>

impl<'a> Unpin for GenericRawAccess<'a>

impl<'a> !UnwindSafe for GenericRawAccess<'a>

Blanket Implementations

impl<T> Access for T where
    T: RawAccess
[src]

type Base = T

Raw access serving as the basis for created indexes.

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<T> Pointable for T

type Init = T

The type for initializers.

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

type Owned = T

The resulting type after obtaining ownership.

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>,