pub struct MinusOneError {
pub message: String,
/* private fields */
}Fields§
§message: StringAssociated message of the context
Implementations§
Source§impl MinusOneError
impl MinusOneError
Sourcepub fn new(kind: MinusOneErrorKind, message: &str) -> Self
pub fn new(kind: MinusOneErrorKind, message: &str) -> Self
create a new MinusOne error
§Example
use minusone::error::{MinusOneError, MinusOneErrorKind};
let error = MinusOneError::new(MinusOneErrorKind::Unknown, "Unknown");Sourcepub fn kind(&self) -> MinusOneErrorKind
pub fn kind(&self) -> MinusOneErrorKind
Return the kind of error
§Example
use minusone::error::{MinusOneError, MinusOneErrorKind};
let error = MinusOneError::new(MinusOneErrorKind::Unknown, "unknown");
assert_eq!(error.kind(), MinusOneErrorKind::Unknown)Trait Implementations§
Auto Trait Implementations§
impl Freeze for MinusOneError
impl RefUnwindSafe for MinusOneError
impl Send for MinusOneError
impl Sync for MinusOneError
impl Unpin for MinusOneError
impl UnsafeUnpin for MinusOneError
impl UnwindSafe for MinusOneError
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