pub struct FromPathError { /* private fields */ }
Expand description
An error raised when attempting to convert a path using
RelativePathBuf::from_path
.
Implementations§
Source§impl 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§
Source§impl Clone for FromPathError
impl Clone for FromPathError
Source§fn clone(&self) -> FromPathError
fn clone(&self) -> FromPathError
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for FromPathError
impl Debug for FromPathError
Source§impl Display for FromPathError
impl Display for FromPathError
Source§impl Error for FromPathError
impl Error for FromPathError
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<FromPathErrorKind> for FromPathError
impl From<FromPathErrorKind> for FromPathError
Source§fn from(value: FromPathErrorKind) -> Self
fn from(value: FromPathErrorKind) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FromPathError
impl PartialEq for FromPathError
impl Eq for FromPathError
impl StructuralPartialEq for FromPathError
Auto Trait Implementations§
impl Freeze for FromPathError
impl RefUnwindSafe for FromPathError
impl Send for FromPathError
impl Sync for FromPathError
impl Unpin for FromPathError
impl UnwindSafe for FromPathError
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)