Struct hermes_ipfs::IpfsPath
pub struct IpfsPath {
root: PathRoot,
pub(crate) path: SlashedPath,
}
Expand description
Enum for specifying paths in IPFS.
Abstraction over Ipfs paths, which are used to target sub-trees or sub-documents on top of
content addressable (Cid
) trees. The most common use case is to specify a file under an
unixfs tree from underneath a Cid
forest.
In addition to being based on content addressing, IpfsPaths provide adaptation from other Ipfs
(related) functionality which can be resolved to a Cid
such as IPNS. IpfsPaths have similar
structure to and can start with a “protocol” as Multiaddr, except the protocols are
different, and at the moment there can be at most one protocol.
This implementation supports:
- synonymous
/ipfs
and/ipld
prefixes to point to aCid
/ipns
to point to either:
See crate::Ipfs::resolve_ipns
for the current IPNS resolving capabilities.
IpfsPath
is usually created through the FromStr
or From
conversions.
Fields§
§root: PathRoot
§path: SlashedPath
Implementations§
Trait Implementations§
source§impl From<GetIpfsFile> for IpfsPath
impl From<GetIpfsFile> for IpfsPath
source§fn from(value: GetIpfsFile) -> Self
fn from(value: GetIpfsFile) -> Self
source§impl From<IpfsPath> for GetIpfsFile
impl From<IpfsPath> for GetIpfsFile
impl Eq for IpfsPath
impl StructuralPartialEq for IpfsPath
Auto Trait Implementations§
impl Freeze for IpfsPath
impl RefUnwindSafe for IpfsPath
impl Send for IpfsPath
impl Sync for IpfsPath
impl Unpin for IpfsPath
impl UnwindSafe for IpfsPath
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more