pub struct UcanStore<S: BlockStore>(pub S);Tuple Fields§
§0: STrait Implementations§
Source§impl<S: BlockStore> UcanStore for UcanStore<S>
impl<S: BlockStore> UcanStore for UcanStore<S>
Source§fn read<'life0, 'life1, 'async_trait, T>(
&'life0 self,
cid: &'life1 Cid,
) -> Pin<Box<dyn Future<Output = Result<Option<T>>> + Send + 'async_trait>>
fn read<'life0, 'life1, 'async_trait, T>( &'life0 self, cid: &'life1 Cid, ) -> Pin<Box<dyn Future<Output = Result<Option<T>>> + Send + 'async_trait>>
Read a value from the store by CID, returning a Result<Option<…>> that unwraps
to None if no value is found, otherwise Some
Source§fn write<'life0, 'async_trait, T>(
&'life0 mut self,
token: T,
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>>where
T: 'async_trait + Encode<RawCodec> + UcanStoreConditionalSend + Debug,
Self: 'async_trait,
'life0: 'async_trait,
fn write<'life0, 'async_trait, T>(
&'life0 mut self,
token: T,
) -> Pin<Box<dyn Future<Output = Result<Cid>> + Send + 'async_trait>>where
T: 'async_trait + Encode<RawCodec> + UcanStoreConditionalSend + Debug,
Self: 'async_trait,
'life0: 'async_trait,
Write a value to the store, receiving a Result that wraps the values CID if the
write was successful
Auto Trait Implementations§
impl<S> Freeze for UcanStore<S>where
S: Freeze,
impl<S> RefUnwindSafe for UcanStore<S>where
S: RefUnwindSafe,
impl<S> Send for UcanStore<S>
impl<S> Sync for UcanStore<S>
impl<S> Unpin for UcanStore<S>where
S: Unpin,
impl<S> UnwindSafe for UcanStore<S>where
S: UnwindSafe,
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