[][src]Struct ipfs::dag::IpldDag

pub struct IpldDag<Types: RepoTypes> { /* fields omitted */ }

ipfs.dag interface providing wrapper around Ipfs.

Implementations

impl<Types: RepoTypes> IpldDag<Types>[src]

pub fn new(ipfs: Ipfs<Types>) -> Self[src]

pub async fn put<'_>(&'_ self, data: Ipld, codec: Codec) -> Result<Cid, Error>[src]

pub async fn get<'_>(&'_ self, path: IpfsPath) -> Result<Ipld, ResolveError>[src]

Resolves a Cid-rooted path to a document "node."

Returns the resolved node as Ipld.

pub async fn resolve<'_>(
    &'_ self,
    path: IpfsPath,
    follow_links: bool
) -> Result<(ResolvedNode, SlashedPath), ResolveError>
[src]

Resolves a Cid-rooted path to a document "node."

The return value has two kinds of meanings depending on whether links should be followed or not: when following links, the second returned value will be the path inside the last document; when not following links, the second returned value will be the unmatched or "remaining" path.

Regardless of the follow_links option, HAMT-sharded directories will be resolved through as a "single step" in the given IpfsPath.

Returns a node and the remaining path or the path inside the last document.

Trait Implementations

impl<Types: Clone + RepoTypes> Clone for IpldDag<Types>[src]

impl<Types: Debug + RepoTypes> Debug for IpldDag<Types>[src]

Auto Trait Implementations

impl<Types> !RefUnwindSafe for IpldDag<Types>

impl<Types> Send for IpldDag<Types> where
    <Types as RepoTypes>::TBlockStore: Send + Sync,
    <Types as RepoTypes>::TDataStore: Send + Sync

impl<Types> Sync for IpldDag<Types> where
    <Types as RepoTypes>::TBlockStore: Send + Sync,
    <Types as RepoTypes>::TDataStore: Send + Sync

impl<Types> Unpin for IpldDag<Types>

impl<Types> !UnwindSafe for IpldDag<Types>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]