pub enum PathKind {
SetExists(PathBuf),
SetAbsent(PathBuf),
NotSet(usize),
}Expand description
Represents the presence or absence of a path
Variants§
SetExists(PathBuf)
A PathBuf that has been defined and points to a real file
SetAbsent(PathBuf)
A PathBuf that has been defined but isn’t a real file
NotSet(usize)
A PathBuf that has not been defined
The number within represents a specific File, and when
printed to, for example, the StatusLine, would show up as
txt!("[file]*scratch file*#{id}")
Implementations§
Source§impl PathKind
impl PathKind
Sourcepub fn path(&self) -> String
pub fn path(&self) -> String
The full path of the file.
If there is no set path, returns "*scratch file*#{id}".
Sourcepub fn path_set(&self) -> Option<String>
pub fn path_set(&self) -> Option<String>
The full path of the file.
Returns None if the path has not been set yet.
Trait Implementations§
impl Eq for PathKind
impl StructuralPartialEq for PathKind
Auto Trait Implementations§
impl Freeze for PathKind
impl RefUnwindSafe for PathKind
impl Send for PathKind
impl Sync for PathKind
impl Unpin for PathKind
impl UnwindSafe for PathKind
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