[−][src]Enum ipfs::dag::ResolvedNode
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.
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.
Path ended on a !dag-pb document which was projected.
Local resolving ended with a link
Implementations
impl ResolvedNode
[src]
pub fn source(&self) -> &Cid
[src]
Returns the Cid
of the source document for the encapsulated document or projection of such.
pub fn into_unixfs_block(self) -> Result<Block, UnexpectedResolved>
[src]
Unwraps the dagpb block variant and turns others into UnexpectedResolved. This is useful wherever unixfs operations are continued after resolving an IpfsPath.
Trait Implementations
impl Debug for ResolvedNode
[src]
impl PartialEq<ResolvedNode> for ResolvedNode
[src]
fn eq(&self, other: &ResolvedNode) -> bool
[src]
fn ne(&self, other: &ResolvedNode) -> bool
[src]
impl StructuralPartialEq for ResolvedNode
[src]
impl TryFrom<ResolvedNode> for Ipld
[src]
type Error = ResolveError
The type returned in the event of a conversion error.
fn try_from(r: ResolvedNode) -> Result<Ipld, Self::Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for ResolvedNode
impl Send for ResolvedNode
impl Sync for ResolvedNode
impl Unpin for ResolvedNode
impl UnwindSafe for ResolvedNode
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> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T> Instrument for T
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[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, 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>,
fn vzip(self) -> V
impl<T> WithSubscriber for T
[src]
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
[src]
S: Into<Dispatch>,