pub enum PathFromComponentsError {
PathTooLong,
TooManyComponents,
}Expand description
An error arising from trying to construct an invalid Path from valid Components.
§Examples
use willow_data_model::prelude::*;
assert_eq!(
Path::<4, 4, 2>::from_component(Component::new(b"oops").unwrap()),
Err(PathFromComponentsError::PathTooLong),
);
assert_eq!(
Path::<4, 1, 9>::from_components(&[
Component::new(b"").unwrap(),
Component::new(b"").unwrap()
]),
Err(PathFromComponentsError::TooManyComponents),
);Variants§
PathTooLong
The Path’s total length in bytes would have been greater than the max_path_length.
TooManyComponents
The Path would have had more Component than the max_component_count.
Trait Implementations§
Source§impl Clone for PathFromComponentsError
impl Clone for PathFromComponentsError
Source§fn clone(&self) -> PathFromComponentsError
fn clone(&self) -> PathFromComponentsError
Returns a duplicate 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 PathFromComponentsError
impl Debug for PathFromComponentsError
Source§impl Display for PathFromComponentsError
impl Display for PathFromComponentsError
Source§impl Error for PathFromComponentsError
impl Error for PathFromComponentsError
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<PathFromComponentsError> for PathError
impl From<PathFromComponentsError> for PathError
Source§fn from(value: PathFromComponentsError) -> Self
fn from(value: PathFromComponentsError) -> Self
Converts to this type from the input type.
Source§impl Hash for PathFromComponentsError
impl Hash for PathFromComponentsError
Source§impl Ord for PathFromComponentsError
impl Ord for PathFromComponentsError
Source§fn cmp(&self, other: &PathFromComponentsError) -> Ordering
fn cmp(&self, other: &PathFromComponentsError) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for PathFromComponentsError
impl PartialEq for PathFromComponentsError
Source§impl PartialOrd for PathFromComponentsError
impl PartialOrd for PathFromComponentsError
impl Copy for PathFromComponentsError
impl Eq for PathFromComponentsError
impl StructuralPartialEq for PathFromComponentsError
Auto Trait Implementations§
impl Freeze for PathFromComponentsError
impl RefUnwindSafe for PathFromComponentsError
impl Send for PathFromComponentsError
impl Sync for PathFromComponentsError
impl Unpin for PathFromComponentsError
impl UnwindSafe for PathFromComponentsError
Blanket Implementations§
Source§impl<T> AsErrorSource for Twhere
T: Error + 'static,
impl<T> AsErrorSource for Twhere
T: Error + 'static,
Source§fn as_error_source(&self) -> &(dyn Error + 'static)
fn as_error_source(&self) -> &(dyn Error + 'static)
For maximum effectiveness, this needs to be called as a method
to benefit from Rust’s automatic dereferencing of method
receivers.
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