#[non_exhaustive]
pub struct InvalidCidInLink { pub nth: usize, pub hash: Cow<'static, [u8]>, pub name: Cow<'static, str>, pub source: Error, }
Expand description

A link could not be transformed into a Cid.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§nth: usize

The index of this link, from zero

§hash: Cow<'static, [u8]>

Hash which could not be turned into a Cid

§name: Cow<'static, str>

Name of the link, most likely empty when this originates from a file, most likely non-empty for other kinds.

§source: Error

Error from the attempted conversion

Trait Implementations§

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

fn source(&self) -> Option<&(dyn Error + 'static)>

The lower-level source of this error, if any. Read more
1.0.0 · source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
source§

fn from((nth, link, source): (usize, PBLink<'a>, Error)) -> Self

Converts to this type from the input type.
source§

impl From<InvalidCidInLink> for Error

source§

fn from(e: InvalidCidInLink) -> Self

Converts to this type from the input type.
source§

impl From<InvalidCidInLink> for LookupError

source§

fn from(e: InvalidCidInLink) -> Self

Converts to this type from the input type.
source§

impl From<InvalidCidInLink> for ResolveError

source§

fn from(e: InvalidCidInLink) -> ResolveError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

fn into(self) -> U

Calls U::from(self).

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

source§

fn provide<'a>(&'a self, demand: &mut Demand<'a>)

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
§

fn references<R, E>(_c: RawCodec, _r: &mut R, _set: &mut E) -> Result<(), Error>where R: Read, E: Extend<Cid<64>>,

Scrape the references from an impl Read. Read more
§

type Output = T

Should always be Self
source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.