Trait WrappedFormat

Source
pub trait WrappedFormat<S: Storage>:
    Debug
    + Display
    + Send
    + Sync {
    // Required methods
    fn wrap(inner: FormatAccess<S>) -> Self;
    fn inner(&self) -> &FormatAccess<S>;
}
Expand description

Represents FormatAccess wrapped in e.g. Arc, Box, or nothing at all.

This struct is necessary so that we can reference format instances regardless of whether the user decides to wrap them or not.

Required Methods§

Source

fn wrap(inner: FormatAccess<S>) -> Self

Construct this WrappedFormat.

Source

fn inner(&self) -> &FormatAccess<S>

Access the inner format instance.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<S: Storage> WrappedFormat<S> for OwnedRwLockReadGuard<FormatAccess<S>>

Source§

fn wrap(inner: FormatAccess<S>) -> Self

Source§

fn inner(&self) -> &FormatAccess<S>

Implementors§

Source§

impl<S: Storage + 'static, D: Deref<Target = FormatAccess<S>> + Debug + Display + From<FormatAccess<S>> + Send + Sync> WrappedFormat<S> for D

Source§

impl<S: Storage> WrappedFormat<S> for FormatAccess<S>