[−][src]Struct asn1_der::Error
A typed-error that contains the error-kind, description, the position (file, line) and an optional sub-error
Fields
kind: T
description: String
file: &'static str
line: u32
sub_error: Option<Rc<WrappedError>>
Methods
impl<T> Error<T> where
T: Send + Debug,
[src]
T: Send + Debug,
pub fn with_kind_desc<S>(
kind: T,
description: S,
file: &'static str,
line: u32
) -> Error<T> where
S: ToString,
[src]
kind: T,
description: S,
file: &'static str,
line: u32
) -> Error<T> where
S: ToString,
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]
kind: T,
description: S,
sub_error: WrappedError,
file: &'static str,
line: u32
) -> Error<T> where
S: ToString,
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]
kind: T,
sub_error: WrappedError,
file: &'static str,
line: u32
) -> Error<T>
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]
T: Clone,
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]
T: Send + Debug,
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]
T: Send + Debug + Debug,
impl<T> Send for Error<T> where
T: Send + Debug,
[src]
T: Send + Debug,
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,