Struct melody::MelodyErrors
source · pub struct MelodyErrors { /* private fields */ }
Expand description
Errors from Melody
Implementations
sourceimpl MelodyErrors
impl MelodyErrors
MelodyErrors
Example
match ::std::env::current_dir() {
Ok(path) => {
if !path.exists() {
Err(melody::MelodyErrors::new(melody::MelodyErrorsKind::PathDoesNotExist, "Path does not exist", Some(&path)))
} else {
Ok(path)
}
},
Err(e) => Err(e.into())
};
Trait Implementations
sourceimpl Debug for MelodyErrors
impl Debug for MelodyErrors
sourceimpl Display for MelodyErrors
impl Display for MelodyErrors
sourceimpl Error for MelodyErrors
impl Error for MelodyErrors
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
Auto Trait Implementations
impl RefUnwindSafe for MelodyErrors
impl Send for MelodyErrors
impl Sync for MelodyErrors
impl Unpin for MelodyErrors
impl UnwindSafe for MelodyErrors
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more