Struct relative_path::FromPathError
source · [−]pub struct FromPathError { /* private fields */ }
Expand description
An error raised when attempting to convert a path using RelativePathBuf::from_path.
Implementations
sourceimpl FromPathError
impl FromPathError
sourcepub fn kind(&self) -> FromPathErrorKind
pub fn kind(&self) -> FromPathErrorKind
Gets the underlying FromPathErrorKind
that provides more details on
what went wrong.
Examples
use std::path::Path;
use relative_path::{FromPathErrorKind, RelativePathBuf};
let result = RelativePathBuf::from_path(Path::new("/hello/world"));
let e = result.unwrap_err();
assert_eq!(FromPathErrorKind::NonRelative, e.kind());
Trait Implementations
sourceimpl Clone for FromPathError
impl Clone for FromPathError
sourcefn clone(&self) -> FromPathError
fn clone(&self) -> FromPathError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FromPathError
impl Debug for FromPathError
sourceimpl Display for FromPathError
impl Display for FromPathError
sourceimpl Error for FromPathError
impl Error for FromPathError
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
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
sourceimpl From<FromPathErrorKind> for FromPathError
impl From<FromPathErrorKind> for FromPathError
sourcefn from(value: FromPathErrorKind) -> Self
fn from(value: FromPathErrorKind) -> Self
Converts to this type from the input type.
sourceimpl PartialEq<FromPathError> for FromPathError
impl PartialEq<FromPathError> for FromPathError
sourcefn eq(&self, other: &FromPathError) -> bool
fn eq(&self, other: &FromPathError) -> bool
impl Eq for FromPathError
impl StructuralEq for FromPathError
impl StructuralPartialEq for FromPathError
Auto Trait Implementations
impl RefUnwindSafe for FromPathError
impl Send for FromPathError
impl Sync for FromPathError
impl Unpin for FromPathError
impl UnwindSafe for FromPathError
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