Struct DocumentPath
pub struct DocumentPath(/* private fields */);Expand description
A validated or raw document path such as profile.display_name.
Implementations§
§impl DocumentPath
impl DocumentPath
§impl DocumentPath
impl DocumentPath
pub fn try_new(value: impl AsRef<str>) -> Result<DocumentPath, PathParseError>
pub fn try_new(value: impl AsRef<str>) -> Result<DocumentPath, PathParseError>
Creates a document path after validating dot-path structure.
pub fn segments(&self) -> Result<Vec<PathSegment>, PathParseError>
pub fn segments(&self) -> Result<Vec<PathSegment>, PathParseError>
Parses the path into individual segments.
Trait Implementations§
§impl AsRef<str> for DocumentPath
impl AsRef<str> for DocumentPath
§impl Clone for DocumentPath
impl Clone for DocumentPath
§fn clone(&self) -> DocumentPath
fn clone(&self) -> DocumentPath
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 more§impl Debug for DocumentPath
impl Debug for DocumentPath
§impl Default for DocumentPath
impl Default for DocumentPath
§fn default() -> DocumentPath
fn default() -> DocumentPath
Returns the “default value” for a type. Read more
§impl Display for DocumentPath
impl Display for DocumentPath
§impl From<&str> for DocumentPath
impl From<&str> for DocumentPath
§fn from(value: &str) -> DocumentPath
fn from(value: &str) -> DocumentPath
Converts to this type from the input type.
§impl From<String> for DocumentPath
impl From<String> for DocumentPath
§fn from(value: String) -> DocumentPath
fn from(value: String) -> DocumentPath
Converts to this type from the input type.
§impl FromStr for DocumentPath
impl FromStr for DocumentPath
§type Err = PathParseError
type Err = PathParseError
The associated error which can be returned from parsing.
§fn from_str(input: &str) -> Result<DocumentPath, <DocumentPath as FromStr>::Err>
fn from_str(input: &str) -> Result<DocumentPath, <DocumentPath as FromStr>::Err>
Parses a string
s to return a value of this type. Read more§impl Hash for DocumentPath
impl Hash for DocumentPath
§impl Ord for DocumentPath
impl Ord for DocumentPath
§impl PartialEq for DocumentPath
impl PartialEq for DocumentPath
§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