pub struct GitModulePath(/* private fields */);Expand description
A validated, canonical sub-path within a Git-backed dependency.
Represents the path field on a Git dependency source—the relative
directory within the repository that contains the module’s
module.json. Wraps RelativePath and additionally rejects "."
and empty strings, both of which are semantically equivalent to “no
sub-path” (i.e., the module sits at the repository root).
Implementations§
Source§impl GitModulePath
impl GitModulePath
Sourcepub fn into_relative_path(self) -> RelativePath
pub fn into_relative_path(self) -> RelativePath
Consumes the GitModulePath and returns the underlying
RelativePath.
Trait Implementations§
Source§impl AsRef<Path> for GitModulePath
impl AsRef<Path> for GitModulePath
Source§impl AsRef<str> for GitModulePath
impl AsRef<str> for GitModulePath
Source§impl Clone for GitModulePath
impl Clone for GitModulePath
Source§fn clone(&self) -> GitModulePath
fn clone(&self) -> GitModulePath
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 GitModulePath
impl Debug for GitModulePath
Source§impl<'de> Deserialize<'de> for GitModulePath
impl<'de> Deserialize<'de> for GitModulePath
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 Display for GitModulePath
impl Display for GitModulePath
impl Eq for GitModulePath
Source§impl From<GitModulePath> for String
impl From<GitModulePath> for String
Source§fn from(path: GitModulePath) -> Self
fn from(path: GitModulePath) -> Self
Converts to this type from the input type.
Source§impl From<GitModulePath> for PathBuf
impl From<GitModulePath> for PathBuf
Source§fn from(path: GitModulePath) -> Self
fn from(path: GitModulePath) -> Self
Converts to this type from the input type.
Source§impl FromStr for GitModulePath
impl FromStr for GitModulePath
Source§impl Hash for GitModulePath
impl Hash for GitModulePath
Source§impl Ord for GitModulePath
impl Ord for GitModulePath
Source§fn cmp(&self, other: &GitModulePath) -> Ordering
fn cmp(&self, other: &GitModulePath) -> 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 GitModulePath
impl PartialEq for GitModulePath
Source§impl PartialOrd for GitModulePath
impl PartialOrd for GitModulePath
Source§impl Serialize for GitModulePathwhere
Self: Display,
impl Serialize for GitModulePathwhere
Self: Display,
impl StructuralPartialEq for GitModulePath
Auto Trait Implementations§
impl Freeze for GitModulePath
impl RefUnwindSafe for GitModulePath
impl Send for GitModulePath
impl Sync for GitModulePath
impl Unpin for GitModulePath
impl UnsafeUnpin for GitModulePath
impl UnwindSafe for GitModulePath
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.