pub struct DocumentPath(/* private fields */);Expand description
A validated or raw document path such as profile.display_name.
Implementations§
Source§impl DocumentPath
impl DocumentPath
Source§impl DocumentPath
impl DocumentPath
Sourcepub fn try_new(value: impl AsRef<str>) -> Result<Self, PathParseError>
pub fn try_new(value: impl AsRef<str>) -> Result<Self, PathParseError>
Creates a document path after validating dot-path structure.
Sourcepub fn segments(&self) -> Result<Vec<PathSegment>, PathParseError>
pub fn segments(&self) -> Result<Vec<PathSegment>, PathParseError>
Parses the path into individual segments.
Trait Implementations§
Source§impl AsRef<str> for DocumentPath
impl AsRef<str> for DocumentPath
Source§impl Clone for DocumentPath
impl Clone for DocumentPath
Source§fn clone(&self) -> DocumentPath
fn clone(&self) -> DocumentPath
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 DocumentPath
impl Debug for DocumentPath
Source§impl Default for DocumentPath
impl Default for DocumentPath
Source§fn default() -> DocumentPath
fn default() -> DocumentPath
Returns the “default value” for a type. Read more
Source§impl Display for DocumentPath
impl Display for DocumentPath
Source§impl From<&str> for DocumentPath
impl From<&str> for DocumentPath
Source§impl From<String> for DocumentPath
impl From<String> for DocumentPath
Source§impl FromStr for DocumentPath
impl FromStr for DocumentPath
Source§impl Hash for DocumentPath
impl Hash for DocumentPath
Source§impl Ord for DocumentPath
impl Ord for DocumentPath
Source§fn cmp(&self, other: &DocumentPath) -> Ordering
fn cmp(&self, other: &DocumentPath) -> Ordering
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
Source§impl PartialEq for DocumentPath
impl PartialEq for DocumentPath
Source§fn eq(&self, other: &DocumentPath) -> bool
fn eq(&self, other: &DocumentPath) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for DocumentPath
impl PartialOrd for DocumentPath
impl Eq for DocumentPath
impl StructuralPartialEq for DocumentPath
Auto Trait Implementations§
impl Freeze for DocumentPath
impl RefUnwindSafe for DocumentPath
impl Send for DocumentPath
impl Sync for DocumentPath
impl Unpin for DocumentPath
impl UnsafeUnpin for DocumentPath
impl UnwindSafe for DocumentPath
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