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<'de> Deserialize<'de> for BuckyError
impl<'de> Deserialize<'de> for BuckyError
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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<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§fn from(err: Error) -> BuckyError
fn from(err: Error) -> BuckyError
Converts to this type from the input type.
Source§impl From<Error> for BuckyError
Available on non-WebAssembly only.
impl From<Error> for BuckyError
Available on non-WebAssembly only.
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<Error> for BuckyError
impl From<Error> for BuckyError
Source§impl From<FromHexError> for BuckyError
impl From<FromHexError> for BuckyError
Source§fn from(e: FromHexError) -> Self
fn from(e: FromHexError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for BuckyError
impl From<ParseError> for BuckyError
Source§fn from(e: ParseError) -> Self
fn from(e: ParseError) -> Self
Converts to this type from the input type.
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<StatusCode> for BuckyError
impl From<StatusCode> for BuckyError
Source§fn from(code: StatusCode) -> Self
fn from(code: StatusCode) -> Self
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<TimeoutError> for BuckyError
impl From<TimeoutError> for BuckyError
Source§fn from(err: TimeoutError) -> BuckyError
fn from(err: TimeoutError) -> 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<ZipError> for BuckyError
Available on non-WebAssembly only.
impl From<ZipError> for BuckyError
Available on non-WebAssembly only.
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.
Source§impl JsonCodec<BuckyError> for BuckyError
impl JsonCodec<BuckyError> for BuckyError
fn encode_json(&self) -> Map<String, Value>
fn decode_json(obj: &Map<String, Value>) -> BuckyResult<Self>
fn encode_string(&self) -> String
fn decode_string(value: &str) -> BuckyResult<T>
fn decode_value(value: &Value) -> BuckyResult<T>
fn encode_value(&self) -> Value
Source§impl<'__de__> RawDecode<'__de__> for BuckyError
impl<'__de__> RawDecode<'__de__> for BuckyError
fn raw_decode(__buf__: &'__de__ [u8]) -> BuckyResult<(Self, &'__de__ [u8])>
fn raw_decode_with_option( buf: &'de [u8], _opt: &RawDecodeOption, ) -> BuckyResult<(Self, &'de [u8])>
Source§impl RawEncode for BuckyError
impl RawEncode for BuckyError
fn raw_encode<'__de__>( &self, __buf__: &'__de__ mut [u8], __purpose__: &Option<RawEncodePurpose>, ) -> BuckyResult<&'__de__ mut [u8]>
fn raw_measure( &self, __purpose__: &Option<RawEncodePurpose>, ) -> BuckyResult<usize>
fn raw_tail_encode<'a>( &self, buf: &'a mut [u8], purpose: &Option<RawEncodePurpose>, ) -> BuckyResult<&'a [u8]>
fn raw_encode_to_buffer(&self) -> BuckyResult<Vec<u8>>
fn raw_hash_value(&self) -> BuckyResult<HashValue>
fn hash_buf(&self, encoded_buf: &[u8]) -> HashValue
fn raw_hash_encode(&self) -> BuckyResult<Vec<u8>>
Auto Trait Implementations§
impl Freeze for BuckyError
impl !RefUnwindSafe for BuckyError
impl Send for BuckyError
impl Sync for BuckyError
impl Unpin for BuckyError
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
impl<'de, D> FileDecoder<'de> for Dwhere
D: RawDecode<'de>,
fn decode_from_file( file: &Path, buf: &'de mut Vec<u8>, ) -> Result<(D, usize), BuckyError>
Source§impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
impl<D> FileEncoder<D> for Dwhere
D: RawEncode,
fn suggest_buffer_size(&self) -> Result<usize, BuckyError>
fn encode<'a>( &self, buf: &'a mut [u8], _is_compress: bool, ) -> Result<&'a mut [u8], BuckyError>
fn encode_to_writer( &self, writer: impl Write, is_compress: bool, ) -> BuckyResult<usize>
fn encode_to_file(&self, file: &Path, is_compress: bool) -> BuckyResult<usize>
fn encode_to_vec(&self, is_compress: bool) -> BuckyResult<Vec<u8>>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more