pub struct Error { /* private fields */ }Expand description
Error type returned across all Sift crates.
Implementations§
Source§impl Error
impl Error
Sourcepub fn new_msg<S: AsRef<str>>(kind: ErrorKind, msg: S) -> Self
pub fn new_msg<S: AsRef<str>>(kind: ErrorKind, msg: S) -> Self
Initializes an Error with a generic message.
Sourcepub fn new_general<S: AsRef<str>>(msg: S) -> Self
pub fn new_general<S: AsRef<str>>(msg: S) -> Self
Initializes a general catch-all type of Error. Contributors should be careful not to use this unless strictly necessary.
Sourcepub fn new_arg_error<S: AsRef<str>>(msg: S) -> Self
pub fn new_arg_error<S: AsRef<str>>(msg: S) -> Self
Used for user-errors that have to do with bad arguments.
Sourcepub fn new_empty_response<S: AsRef<str>>(msg: S) -> Self
pub fn new_empty_response<S: AsRef<str>>(msg: S) -> Self
Tonic response types usually return optional types that we need to handle; if responses are empty then this is the appropriate way to initialize an Error for that situation, though this has never been observed.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more