pub struct Storage {
pub pins: CoMap<String, Pin>,
pub blocks: CoMap<WeakCid, BlockMetadata>,
pub blocks_index_unreferenced: CoMap<WeakCid, BlockInfo>,
pub block_structure_pending: CoMap<WeakCid, BlockStructurePending>,
}Fields§
§pins: CoMap<String, Pin>Named pins.
blocks: CoMap<WeakCid, BlockMetadata>Block metadata.
blocks_index_unreferenced: CoMap<WeakCid, BlockInfo>Block metadata index to unreferenced (reference count of zero and children resolved) entries.
See: BlockMetadata::is_removable
block_structure_pending: CoMap<WeakCid, BlockStructurePending>Blocks that are recursively added but children are pending. Blocks that are recursively deleted but children has not yet unreferenced.
Implementations§
Source§impl Storage
impl Storage
Sourcepub async fn initial_state<S: BlockStorage + Clone + 'static>(
storage: &S,
actions: Vec<StorageAction>,
) -> Result<OptionLink<Self>, Error>
pub async fn initial_state<S: BlockStorage + Clone + 'static>( storage: &S, actions: Vec<StorageAction>, ) -> Result<OptionLink<Self>, Error>
Create inital state.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Storage
impl<'de> Deserialize<'de> for Storage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Ord for Storage
impl Ord for Storage
Source§impl PartialOrd for Storage
impl PartialOrd for Storage
Source§impl Reducer<StorageAction> for Storage
impl Reducer<StorageAction> for Storage
async fn reduce( state: OptionLink<Self>, event: Link<ReducerAction<StorageAction>>, storage: &CoreBlockStorage, ) -> Result<Link<Self>, Error>
impl Eq for Storage
impl StructuralPartialEq for Storage
Auto Trait Implementations§
impl Freeze for Storage
impl RefUnwindSafe for Storage
impl Send for Storage
impl Sync for Storage
impl Unpin for Storage
impl UnsafeUnpin for Storage
impl UnwindSafe for Storage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more