Struct cm_types::RelativePath
source · pub struct RelativePath(_);
Expand description
A relative filesystem path.
Implementations§
source§impl RelativePath
impl RelativePath
sourcepub fn new(path: impl AsRef<str> + Into<String>) -> Result<Self, ParseError>
pub fn new(path: impl AsRef<str> + Into<String>) -> Result<Self, ParseError>
Creates a RelativePath
from a String
, returning an Err
if the string fails
validation. The string must be non-empty, no more than 1024 characters in length, not start
with a /
, and contain no empty path segments.
pub fn as_str(&self) -> &str
Trait Implementations§
source§impl Clone for RelativePath
impl Clone for RelativePath
source§fn clone(&self) -> RelativePath
fn clone(&self) -> RelativePath
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 RelativePath
impl Debug for RelativePath
source§impl<'de> Deserialize<'de> for RelativePath
impl<'de> Deserialize<'de> for RelativePath
source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<RelativePath> for String
impl From<RelativePath> for String
source§fn from(path: RelativePath) -> String
fn from(path: RelativePath) -> String
Converts to this type from the input type.
source§impl FromStr for RelativePath
impl FromStr for RelativePath
source§impl PartialEq<RelativePath> for RelativePath
impl PartialEq<RelativePath> for RelativePath
source§fn eq(&self, other: &RelativePath) -> bool
fn eq(&self, other: &RelativePath) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.