pub struct PathSegment(/* private fields */);Expand description
A validated path segment.
Constructed via PathSegment::try_new (or
std::str::FromStr). The full set of rejection cases is
captured in SegmentError.
§Examples
use haz_domain::path::PathSegment;
let s = PathSegment::try_new("lib.rs").unwrap();
assert_eq!(s.to_string(), "lib.rs");Implementations§
Source§impl PathSegment
impl PathSegment
Source§impl PathSegment
impl PathSegment
pub fn into_inner(self) -> String
Trait Implementations§
Source§impl AsRef<str> for PathSegment
impl AsRef<str> for PathSegment
Source§impl Clone for PathSegment
impl Clone for PathSegment
Source§impl Debug for PathSegment
impl Debug for PathSegment
Source§impl Display for PathSegment
impl Display for PathSegment
impl Eq for PathSegment
Source§impl FromStr for PathSegment
impl FromStr for PathSegment
Source§impl Hash for PathSegment
impl Hash for PathSegment
Source§impl Ord for PathSegment
impl Ord for PathSegment
1.21.0 (const: unstable) · 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
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for PathSegment
impl PartialEq for PathSegment
Source§impl PartialOrd for PathSegment
impl PartialOrd for PathSegment
impl StructuralPartialEq for PathSegment
Auto Trait Implementations§
impl Freeze for PathSegment
impl RefUnwindSafe for PathSegment
impl Send for PathSegment
impl Sync for PathSegment
impl Unpin for PathSegment
impl UnsafeUnpin for PathSegment
impl UnwindSafe for PathSegment
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