pub struct BuckyError { /* private fields */ }
Implementations§
Source§impl BuckyError
impl BuckyError
pub fn new(code: impl Into<BuckyErrorCode>, msg: impl Into<String>) -> Self
pub fn set_code(&mut self, code: impl Into<BuckyErrorCode>)
pub fn code(&self) -> BuckyErrorCode
pub fn with_code(self, code: impl Into<BuckyErrorCode>) -> Self
pub fn set_msg(&mut self, msg: impl Into<String>)
pub fn msg(&self) -> &str
pub fn with_msg(self, msg: impl Into<String>) -> Self
pub fn origin(&self) -> &Option<BuckyOriginError>
pub fn into_origin(self) -> Option<BuckyOriginError>
pub fn error_with_log<T>(msg: impl Into<String> + Display) -> BuckyResult<T>
Trait Implementations§
Source§impl Clone for BuckyError
impl Clone for BuckyError
Source§impl Debug for BuckyError
impl Debug for BuckyError
Source§impl Display for BuckyError
impl Display for BuckyError
Source§impl Error for BuckyError
impl Error for BuckyError
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()
Source§impl From<&str> for BuckyError
impl From<&str> for BuckyError
Source§fn from(msg: &str) -> BuckyError
fn from(msg: &str) -> BuckyError
Converts to this type from the input type.
Source§impl From<(BuckyErrorCode, &str)> for BuckyError
impl From<(BuckyErrorCode, &str)> for BuckyError
Source§fn from(cm: (BuckyErrorCode, &str)) -> BuckyError
fn from(cm: (BuckyErrorCode, &str)) -> BuckyError
Converts to this type from the input type.
Source§impl From<(BuckyErrorCode, String)> for BuckyError
impl From<(BuckyErrorCode, String)> for BuckyError
Source§fn from(cm: (BuckyErrorCode, String)) -> BuckyError
fn from(cm: (BuckyErrorCode, String)) -> BuckyError
Converts to this type from the input type.
Source§impl From<(BuckyErrorCode, String, Option<BuckyOriginError>)> for BuckyError
impl From<(BuckyErrorCode, String, Option<BuckyOriginError>)> for BuckyError
Source§fn from(value: (BuckyErrorCode, String, Option<BuckyOriginError>)) -> Self
fn from(value: (BuckyErrorCode, String, Option<BuckyOriginError>)) -> Self
Converts to this type from the input type.
Source§impl From<AddrParseError> for BuckyError
impl From<AddrParseError> for BuckyError
Source§fn from(err: AddrParseError) -> BuckyError
fn from(err: AddrParseError) -> BuckyError
Converts to this type from the input type.
Source§impl From<BuckyError> for Error
impl From<BuckyError> for Error
Source§fn from(err: BuckyError) -> Error
fn from(err: BuckyError) -> Error
Converts to this type from the input type.
Source§impl From<BuckyErrorCode> for BuckyError
impl From<BuckyErrorCode> for BuckyError
Source§fn from(code: BuckyErrorCode) -> BuckyError
fn from(code: BuckyErrorCode) -> BuckyError
Converts to this type from the input type.
Source§impl From<CodeError> for BuckyError
impl From<CodeError> for BuckyError
Source§impl From<Error> for BuckyError
impl From<Error> for BuckyError
Source§fn from(err: Error) -> BuckyError
fn from(err: Error) -> BuckyError
Converts to this type from the input type.
Source§impl From<Error> for BuckyError
impl From<Error> for BuckyError
Source§impl From<ParseFloatError> for BuckyError
impl From<ParseFloatError> for BuckyError
Source§fn from(err: ParseFloatError) -> BuckyError
fn from(err: ParseFloatError) -> BuckyError
Converts to this type from the input type.
Source§impl From<ParseIntError> for BuckyError
impl From<ParseIntError> for BuckyError
Source§fn from(err: ParseIntError) -> BuckyError
fn from(err: ParseIntError) -> BuckyError
Converts to this type from the input type.
Source§impl From<String> for BuckyError
impl From<String> for BuckyError
Source§fn from(msg: String) -> BuckyError
fn from(msg: String) -> BuckyError
Converts to this type from the input type.
Source§impl From<StripPrefixError> for BuckyError
impl From<StripPrefixError> for BuckyError
Source§fn from(err: StripPrefixError) -> BuckyError
fn from(err: StripPrefixError) -> BuckyError
Converts to this type from the input type.
Source§impl From<Utf8Error> for BuckyError
impl From<Utf8Error> for BuckyError
Source§fn from(err: Utf8Error) -> BuckyError
fn from(err: Utf8Error) -> BuckyError
Converts to this type from the input type.
Source§impl From<u32> for BuckyError
impl From<u32> for BuckyError
Source§fn from(err: u32) -> BuckyError
fn from(err: u32) -> BuckyError
Converts to this type from the input type.
Source§impl Into<BuckyErrorCode> for BuckyError
impl Into<BuckyErrorCode> for BuckyError
Source§fn into(self) -> BuckyErrorCode
fn into(self) -> BuckyErrorCode
Converts this type into the (usually inferred) input type.
Auto Trait Implementations§
impl Freeze for BuckyError
impl !RefUnwindSafe for BuckyError
impl Send for BuckyError
impl Sync for BuckyError
impl Unpin for BuckyError
impl !UnwindSafe for BuckyError
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