pub struct IpfsPath { /* private fields */ }
Expand description
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 a [Cid
] /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.
Implementations§
Trait Implementations§
source§impl PartialEq<IpfsPath> for IpfsPath
impl PartialEq<IpfsPath> for IpfsPath
impl Eq for IpfsPath
impl StructuralEq for IpfsPath
impl StructuralPartialEq for IpfsPath
Auto Trait Implementations§
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> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.