pub struct File { /* private fields */ }Implementations§
Source§impl File
impl File
pub fn path(&self) -> &str
pub fn origin(&self) -> &Origin
pub fn status(&self) -> &Status
pub fn from_path(path: &Path) -> Option<File>
pub fn from_raw_path(path: &Path) -> Option<File>
pub fn from_str(path: &str) -> Option<File>
pub fn dir(&self) -> Result<&str, RepositoryError>
Sourcepub fn is_journal_file(path: &str) -> bool
pub fn is_journal_file(path: &str) -> bool
Check if a path looks like a journal file
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Check if this is an active journal file that’s currently being written to
Sourcepub fn is_archived(&self) -> bool
pub fn is_archived(&self) -> bool
Check if this is an archived journal file
Sourcepub fn is_disposed(&self) -> bool
pub fn is_disposed(&self) -> bool
Check if this is a corrupted/disposed journal file
pub fn is_remote(&self) -> bool
Sourcepub fn remote_host(&self) -> Option<&str>
pub fn remote_host(&self) -> Option<&str>
Get the remote host if this is a remote journal
Trait Implementations§
Source§impl<'de> Deserialize<'de> for File
impl<'de> Deserialize<'de> for File
Source§fn deserialize<D>(
deserializer: D,
) -> Result<File, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<File, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for File
Source§impl Ord for File
impl Ord for File
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 PartialOrd for File
impl PartialOrd for File
Source§impl Serialize for File
impl Serialize for File
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for File
Auto Trait Implementations§
impl Freeze for File
impl RefUnwindSafe for File
impl Send for File
impl Sync for File
impl Unpin for File
impl UnsafeUnpin for File
impl UnwindSafe for File
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