Struct etrace::Error [−][src]
pub struct Error<T: Debug + Send> { 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: T
description: String
file: &'static str
line: u32
sub_error: Option<Rc<WrappedError>>
Methods
impl<T: Debug + Send> Error<T>
[src]
impl<T: Debug + Send> Error<T>
pub fn with_kind_desc<S: ToString>(
kind: T,
description: S,
file: &'static str,
line: u32
) -> Self
[src]
pub fn with_kind_desc<S: ToString>(
kind: T,
description: S,
file: &'static str,
line: u32
) -> Self
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) -> Self
[src]
pub fn with_kind(kind: T, file: &'static str, line: u32) -> Self
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: ToString>(
kind: T,
description: S,
sub_error: WrappedError,
file: &'static str,
line: u32
) -> Self
[src]
pub fn propagate_with_kind_desc<S: ToString>(
kind: T,
description: S,
sub_error: WrappedError,
file: &'static str,
line: u32
) -> Self
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
) -> Self
[src]
pub fn propagate_with_kind(
kind: T,
sub_error: WrappedError,
file: &'static str,
line: u32
) -> Self
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) -> Self where
T: Clone,
[src]
pub fn propagate(sub_error: Error<T>, file: &'static str, line: u32) -> Self where
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: Debug + Send> From<Error<T>> for WrappedError
[src]
impl<T: Debug + Send> From<Error<T>> for WrappedError
impl<T: Debug + Debug + Send> Debug for Error<T>
[src]
impl<T: Debug + Debug + Send> Debug for Error<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Debug + Send> ToString for Error<T>
[src]
impl<T: Debug + Send> ToString for Error<T>
fn to_string(&self) -> String
[src]
fn to_string(&self) -> String
Converts the error into a human-readable description ("pretty-print")
impl<T: Debug + Send> Send for Error<T>
[src]
impl<T: Debug + Send> Send for Error<T>