Skip to main content

Error

Enum Error 

Source
pub enum Error<E, C, N, D, G> {
    UnknownEncoding {
        location: Location<N, D, G>,
    },
    UnsupportedEncoding {
        location: Location<N, D, G>,
        encoding: PkiEncoding,
    },
    ReaderCreation {
        location: Location<N, D, G>,
        cause: Error,
    },
    Access {
        location: Location<N, D, G>,
        cause: AccessError<E, N>,
    },
    Callback {
        location: Location<N, D, G>,
        cause: C,
    },
}
Expand description

Refusal preserving both the XML enclosure and the unchanged inner cause.

Variants§

§

UnknownEncoding

The original Encoding attribute does not identify a specified PKI codec.

Fields

§location: Location<N, D, G>

Original encapsulated-value element.

§

UnsupportedEncoding

A specified codec has no decoder in this ASN.1 processing capability. This is unsupported processing, not malformed XML or a digest mismatch.

Fields

§location: Location<N, D, G>

Original encapsulated-value element.

§encoding: PkiEncoding

Original specified codec.

§

ReaderCreation

Common Reader construction refused before the inspection visitor.

Fields

§location: Location<N, D, G>

Original encapsulated-value element.

§cause: Error

Original ASN.1 processing/resource error in decoded-source coordinates.

§

Access

XML access, decoding, generation or resource refusal.

Fields

§location: Location<N, D, G>

Original XML enclosure, not a fabricated binary byte range.

§cause: AccessError<E, N>

Original access/owner cause, including pre-visitor resource errors.

§

Callback

Scoped ASN.1 inspection/check callback refused.

Fields

§location: Location<N, D, G>

Inner offsets refer to the decoded source at this XML node.

§cause: C

Unchanged cause; retained maps keep their own inner source contexts.

Implementations§

Source§

impl<E, C, N, D, G> Error<E, C, N, D, G>

Source

pub fn map_callback<T>(self, map: impl FnOnce(C) -> T) -> Error<E, T, N, D, G>

Maps only the scoped callback cause. Original XML/source locations, resource refusals and access/generation classifications remain intact.

Trait Implementations§

Source§

impl<E: Debug, C: Debug, N: Debug, D: Debug, G: Debug> Debug for Error<E, C, N, D, G>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<E, C, N, D, G> !Freeze for Error<E, C, N, D, G>

§

impl<E, C, N, D, G> RefUnwindSafe for Error<E, C, N, D, G>

§

impl<E, C, N, D, G> Send for Error<E, C, N, D, G>
where Location<N, D, G>: Send, AccessError<E, N>: Send, C: Send,

§

impl<E, C, N, D, G> Sync for Error<E, C, N, D, G>
where Location<N, D, G>: Sync, AccessError<E, N>: Sync, C: Sync,

§

impl<E, C, N, D, G> Unpin for Error<E, C, N, D, G>
where Location<N, D, G>: Unpin, AccessError<E, N>: Unpin, C: Unpin,

§

impl<E, C, N, D, G> UnsafeUnpin for Error<E, C, N, D, G>

§

impl<E, C, N, D, G> UnwindSafe for Error<E, C, N, D, G>
where Location<N, D, G>: UnwindSafe, AccessError<E, N>: UnwindSafe, C: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

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§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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.