pub struct ErrorCode(/* private fields */);Expand description
Код ошибки GNUnet (GNUNET_ErrorCode).
Display выводит пояснение и число, Debug — оба поля раздельно.
assert!(ErrorCode::NONE.is_ok());
assert!(!ErrorCode::IDENTITY_NOT_FOUND.is_ok());
assert!(!ErrorCode::IDENTITY_NOT_FOUND.hint().is_empty());Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const IDENTITY_NOT_FOUND: ErrorCode
pub const IDENTITY_NOT_FOUND: ErrorCode
Ego с таким именем не существует.
Sourcepub fn is_ok(&self) -> bool
pub fn is_ok(&self) -> bool
true только для ErrorCode::NONE.
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
Source§impl Error for ErrorCode
impl Error for ErrorCode
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()
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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