pub enum ResolvedNode {
    Block(Block),
    DagPbData(Cid, NodeData<Box<[u8]>>),
    Projection(Cid, Ipld),
    Link(Cid, Cid),
}
Expand description

IpfsPath’s Cid-based variant can be resolved to the block, projections represented by this type.

Values can be converted to Ipld using Ipld::try_from.

Variants§

§

Block(Block)

Block which was loaded at the end of the path.

§

DagPbData(Cid, NodeData<Box<[u8]>>)

Path ended in Data at a dag-pb node. This is usually not interesting and should be treated as a “Not found” error since dag-pb node did not have a link called Data. The variant exists as there are interface-ipfs-http tests which require this behaviour.

§

Projection(Cid, Ipld)

Path ended on a !dag-pb document which was projected.

Local resolving ended with a link

Implementations§

Returns the Cid of the source document for the encapsulated document or projection of such.

Unwraps the dagpb block variant and turns others into UnexpectedResolved. This is useful wherever unixfs operations are continued after resolving an IpfsPath.

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
The type returned in the event of a conversion error.
Performs the conversion.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Scrape the references from an impl Read. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more