Struct jujutsu_lib::repo_path::RepoPath
source · [−]pub struct RepoPath { /* private fields */ }Implementations
sourceimpl RepoPath
impl RepoPath
pub fn root() -> Self
pub fn from_internal_string(value: &str) -> Self
pub fn from_components(components: Vec<RepoPathComponent>) -> Self
sourcepub fn to_internal_dir_string(&self) -> String
pub fn to_internal_dir_string(&self) -> String
The full string form used internally, not for presenting to users (where we may want to use the platform’s separator). This format includes a trailing slash, unless this path represents the root directory. That way it can be concatenated with a basename and produce a valid path.
sourcepub fn to_internal_file_string(&self) -> String
pub fn to_internal_file_string(&self) -> String
The full string form used internally, not for presenting to users (where we may want to use the platform’s separator).
pub fn to_fs_path(&self, base: &Path) -> PathBuf
pub fn is_root(&self) -> bool
pub fn contains(&self, other: &RepoPath) -> bool
pub fn parent(&self) -> Option<RepoPath>
pub fn split(&self) -> Option<(RepoPath, &RepoPathComponent)>
pub fn components(&self) -> &Vec<RepoPathComponent>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Trait Implementations
sourceimpl Ord for RepoPath
impl Ord for RepoPath
sourceimpl PartialOrd<RepoPath> for RepoPath
impl PartialOrd<RepoPath> for RepoPath
sourcefn partial_cmp(&self, other: &RepoPath) -> Option<Ordering>
fn partial_cmp(&self, other: &RepoPath) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
sourceimpl RepoPathJoin<RepoPathComponent> for RepoPath
impl RepoPathJoin<RepoPathComponent> for RepoPath
impl Eq for RepoPath
impl StructuralEq for RepoPath
impl StructuralPartialEq for RepoPath
Auto Trait Implementations
impl RefUnwindSafe for RepoPath
impl Send for RepoPath
impl Sync for RepoPath
impl Unpin for RepoPath
impl UnwindSafe for RepoPath
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more