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§
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)>
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
source§fn eq(&self, other: &FromPathError) -> bool
fn eq(&self, other: &FromPathError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.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