pub enum DiskState {
Unchanged,
Changed,
Missing,
Unreadable,
Untitled,
}Expand description
What the file behind a document looks like right now, against the bytes leaf
last read from it or wrote to it — the question a frontend asks before it
saves (a Changed file plus a dirty document is an overwrite about to
happen) or when its window regains focus. See Doc::disk_state.
Variants§
Unchanged
The file holds exactly the bytes leaf last read or wrote.
Changed
Someone else wrote the file since. Saving overwrites their work; see
Doc::reload for the other direction.
Missing
The file is gone — deleted or renamed away. A save recreates it.
Unreadable
There is a path, but the file couldn’t be read (permissions, a directory in the way): leaf can’t tell, and won’t guess.
Untitled
No file behind this document yet — see Doc::blank. Nothing can have
changed under a document that was never on disk.
Trait Implementations§
impl Copy for DiskState
impl Eq for DiskState
impl StructuralPartialEq for DiskState
Auto Trait Implementations§
impl Freeze for DiskState
impl RefUnwindSafe for DiskState
impl Send for DiskState
impl Sync for DiskState
impl Unpin for DiskState
impl UnsafeUnpin for DiskState
impl UnwindSafe for DiskState
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