Enum tinychain::fs::CacheBlock
source · [−]pub enum CacheBlock {
BTree(Node),
Chain(ChainBlock),
Scalar(Scalar),
}
Expand description
A cached filesystem block.
Variants
BTree(Node)
Chain(ChainBlock)
Scalar(Scalar)
Trait Implementations
sourceimpl AsType<ChainBlock> for CacheBlock
impl AsType<ChainBlock> for CacheBlock
sourcefn as_type(&self) -> Option<&ChainBlock>
fn as_type(&self) -> Option<&ChainBlock>
Borrow this instance as an instance of T
if possible.
sourcefn as_type_mut(&mut self) -> Option<&mut ChainBlock>
fn as_type_mut(&mut self) -> Option<&mut ChainBlock>
Borrow this instance mutably as an instance of T
if possible.
sourcefn into_type(self) -> Option<ChainBlock>
fn into_type(self) -> Option<ChainBlock>
Convert this instance into an instance of T
if possible.
sourceimpl AsType<Node> for CacheBlock
impl AsType<Node> for CacheBlock
sourcefn as_type_mut(&mut self) -> Option<&mut Node>
fn as_type_mut(&mut self) -> Option<&mut Node>
Borrow this instance mutably as an instance of T
if possible.
sourceimpl AsType<Scalar> for CacheBlock
impl AsType<Scalar> for CacheBlock
sourcefn as_type_mut(&mut self) -> Option<&mut Scalar>
fn as_type_mut(&mut self) -> Option<&mut Scalar>
Borrow this instance mutably as an instance of T
if possible.
sourceimpl Clone for CacheBlock
impl Clone for CacheBlock
sourcefn clone(&self) -> CacheBlock
fn clone(&self) -> CacheBlock
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl FileLoad for CacheBlock
impl FileLoad for CacheBlock
fn load<'life0, 'async_trait>(
path: &'life0 Path,
file: File,
_metadata: Metadata
) -> Pin<Box<dyn Future<Output = Result<Self, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn save<'life0, 'life1, 'async_trait>(
&'life0 self,
file: &'life1 mut File
) -> Pin<Box<dyn Future<Output = Result<u64, Error>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
sourceimpl From<ChainBlock> for CacheBlock
impl From<ChainBlock> for CacheBlock
sourcefn from(block: ChainBlock) -> Self
fn from(block: ChainBlock) -> Self
Converts to this type from the input type.
sourceimpl From<Node> for CacheBlock
impl From<Node> for CacheBlock
Auto Trait Implementations
impl RefUnwindSafe for CacheBlock
impl Send for CacheBlock
impl Sync for CacheBlock
impl Unpin for CacheBlock
impl UnwindSafe for CacheBlock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<F> Match for F
impl<F> Match for F
sourcefn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
fn matches<T>(&self) -> bool where
T: TryCastFrom<Self>,
Returns true
if self
can be cast into the target type T
.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
impl<F, T> TryCastFrom<F> for T where
T: CastFrom<F>,
sourcefn can_cast_from(&F) -> bool
fn can_cast_from(&F) -> bool
Test if value
can be cast into Self
.
sourcefn opt_cast_from(f: F) -> Option<T>
fn opt_cast_from(f: F) -> Option<T>
Returns Some(Self)
if the source value can be cast into Self
, otherwise None
.
sourcefn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
fn try_cast_from<Err, OnErr>(value: T, on_err: OnErr) -> Result<Self, Err> where
OnErr: FnOnce(&T) -> Err,
Returns Ok(Self)
if the source value can be cast into Self
, otherwise calls on_err
.
sourceimpl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
impl<F, T> TryCastInto<T> for F where
T: TryCastFrom<F>,
sourcefn can_cast_into(&self) -> bool
fn can_cast_into(&self) -> bool
Test if self
can be cast into T
.
sourcefn opt_cast_into(self) -> Option<T>
fn opt_cast_into(self) -> Option<T>
Returns Some(T)
if self
can be cast into T
, otherwise None
.
sourcefn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
fn try_cast_into<Err, OnErr>(self, on_err: OnErr) -> Result<T, Err> where
OnErr: FnOnce(&Self) -> Err,
Returns Ok(T)
if self
can be cast into T
, otherwise calls on_err
.
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more