pub struct List<S: Store, T: DagCbor> { /* private fields */ }Implementations§
Source§impl<S, T> List<S, T>where
S: Store,
S::Params: StoreParams<Hashes = Code>,
<S::Params as StoreParams>::Codecs: Into<DagCborCodec>,
T: Decode<DagCborCodec> + Encode<DagCborCodec> + Clone + Send + Sync + DagCbor,
DagCborCodec: Into<<S::Params as StoreParams>::Codecs>,
Ipld: Decode<<S::Params as StoreParams>::Codecs>,
impl<S, T> List<S, T>where
S: Store,
S::Params: StoreParams<Hashes = Code>,
<S::Params as StoreParams>::Codecs: Into<DagCborCodec>,
T: Decode<DagCborCodec> + Encode<DagCborCodec> + Clone + Send + Sync + DagCbor,
DagCborCodec: Into<<S::Params as StoreParams>::Codecs>,
Ipld: Decode<<S::Params as StoreParams>::Codecs>,
pub async fn new(store: S, cache_size: usize, width: u32) -> Result<Self>
pub async fn open(store: S, cache_size: usize, root: Cid) -> Result<Self>
pub fn root(&self) -> &Cid
pub async fn from( store: S, width: u32, cache_size: usize, items: impl Iterator<Item = T>, ) -> Result<Self>
pub async fn push(&mut self, value: T) -> Result<()>
pub async fn pop(&mut self) -> Result<Option<T>>
pub async fn get(&mut self, index: usize) -> Result<Option<T>>
pub async fn set(&mut self, _index: usize, _value: T) -> Result<()>
pub async fn len(&mut self) -> Result<usize>
pub async fn is_empty(&mut self) -> Result<bool>
pub fn iter(&mut self) -> Iter<'_, S, T>
Auto Trait Implementations§
impl<S, T> !Freeze for List<S, T>
impl<S, T> !RefUnwindSafe for List<S, T>
impl<S, T> Send for List<S, T>where
T: Send,
impl<S, T> Sync for List<S, T>where
T: Send,
impl<S, T> Unpin for List<S, T>
impl<S, T> UnwindSafe for List<S, T>
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