[−][src]Struct ipfs_embed::Store
Implementations
impl<C: Codec, M: MultihashDigest> Store<C, M>
[src]
pub fn new(config: Config) -> Result<Self>
[src]
pub fn peer_id(&self) -> &PeerId
[src]
pub fn address(&self) -> &Multiaddr
[src]
pub fn blocks(&self) -> impl Iterator<Item = Result<Cid>>
[src]
pub fn metadata(&self, cid: &Cid) -> Result<Metadata>
[src]
pub fn get_local(&self, cid: &Cid) -> Result<Option<IVec>>
[src]
Trait Implementations
impl<C: Codec, M: MultihashDigest> AliasStore for Store<C, M>
[src]
fn alias<'a>(
&'a self,
alias: &'a [u8],
block: &'a Block<C, M>
) -> StoreResult<'a, ()>
[src]
&'a self,
alias: &'a [u8],
block: &'a Block<C, M>
) -> StoreResult<'a, ()>
fn unalias<'a>(&'a self, alias: &'a [u8]) -> StoreResult<'a, ()>
[src]
fn resolve<'a>(&'a self, alias: &'a [u8]) -> StoreResult<'a, Option<Cid>>
[src]
impl<C: Clone + Codec, M: Clone + MultihashDigest> Clone for Store<C, M>
[src]
impl<C: Debug + Codec, M: Debug + MultihashDigest> Debug for Store<C, M>
[src]
impl<C: Codec, M: MultihashDigest> ReadonlyStore for Store<C, M>
[src]
type Codec = C
The codec type of the store.
type Multihash = M
The multihash type of the store.
const MAX_BLOCK_SIZE: usize
[src]
fn get<'a>(&'a self, cid: Cid) -> StoreResult<'a, Block<C, M>>
[src]
fn get_ipld(
&'a self,
cid: &'a Cid
) -> Pin<Box<dyn Future<Output = Result<Ipld, Error>> + 'a + Send>>
[src]
&'a self,
cid: &'a Cid
) -> Pin<Box<dyn Future<Output = Result<Ipld, Error>> + 'a + Send>>
fn get_path(
&'a self,
path: &'a DagPath<'a>
) -> Pin<Box<dyn Future<Output = Result<Ipld, Error>> + 'a + Send>>
[src]
&'a self,
path: &'a DagPath<'a>
) -> Pin<Box<dyn Future<Output = Result<Ipld, Error>> + 'a + Send>>
impl<C: Codec, M: MultihashDigest> Store for Store<C, M>
[src]
fn insert<'a>(&'a self, block: &'a Block<C, M>) -> StoreResult<'a, ()>
[src]
fn insert_batch<'a>(&'a self, batch: &'a [Block<C, M>]) -> StoreResult<'a, Cid>
[src]
fn flush(&self) -> StoreResult<'_, ()>
[src]
fn unpin<'a>(&'a self, cid: &'a Cid) -> StoreResult<'a, ()>
[src]
Auto Trait Implementations
impl<C, M> !RefUnwindSafe for Store<C, M>
impl<C, M> Send for Store<C, M>
impl<C, M> Sync for Store<C, M>
impl<C, M> Unpin for Store<C, M> where
M: Unpin,
M: Unpin,
impl<C, M> !UnwindSafe for Store<C, M>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,