[][src]Struct asn1_der::Error

pub struct Error<T> where
    T: Send + Debug
{ pub kind: T, pub description: String, pub file: &'static str, pub line: u32, pub sub_error: Option<Rc<WrappedError>>, }

A typed-error that contains the error-kind, description, the position (file, line) and an optional sub-error

Fields

kind: Tdescription: Stringfile: &'static strline: u32sub_error: Option<Rc<WrappedError>>

Methods

impl<T> Error<T> where
    T: Send + Debug
[src]

pub fn with_kind_desc<S>(
    kind: T,
    description: S,
    file: &'static str,
    line: u32
) -> Error<T> where
    S: ToString
[src]

Creates a new error with an explicit description

Note: This function is not intended for direct use; take a look at the new_err!()-macro instead

pub fn with_kind(kind: T, file: &'static str, line: u32) -> Error<T>[src]

Creates a new error

Note: This function is not intended for direct use; take a look at the new_err!()-macro instead

pub fn propagate_with_kind_desc<S>(
    kind: T,
    description: S,
    sub_error: WrappedError,
    file: &'static str,
    line: u32
) -> Error<T> where
    S: ToString
[src]

Creates a new error with an explicit description and a sub-error

Note: This function is not intended for direct use; take a look at the rethrow_err!()- macro instead

pub fn propagate_with_kind(
    kind: T,
    sub_error: WrappedError,
    file: &'static str,
    line: u32
) -> Error<T>
[src]

Creates a new error with a sub-error

Note: This function is not intended for direct use; take a look at the rethrow_err!()- macro instead

pub fn propagate(sub_error: Error<T>, file: &'static str, line: u32) -> Error<T> where
    T: Clone
[src]

Creates a new error with the same kind and description as in the sub-error

Note: This function is not intended for direct use; take a look at the rethrow_err!()- macro instead

Trait Implementations

impl<T> ToString for Error<T> where
    T: Send + Debug
[src]

fn to_string(&self) -> String[src]

Converts the error into a human-readable description ("pretty-print")

impl<T> Debug for Error<T> where
    T: Send + Debug + Debug
[src]

impl<T> Send for Error<T> where
    T: Send + Debug
[src]

Auto Trait Implementations

impl<T> !Sync for Error<T>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]