pub enum DocumentSource {
File,
Scratch,
Remote(Box<RemoteDocument>),
RemoteDirectory(Box<RemoteDirectory>),
Container {
container: ContainerId,
path: PathBuf,
},
Surface(Box<GitSurface>),
Output,
}Expand description
What backs a document. Derived facts (readonly, save refusal) come from this, not from fields callers must keep in sync.
Variants§
File
A file on disk (Buffer.path is Some).
Scratch
The [No Name] scratch buffer.
Remote(Box<RemoteDocument>)
An in-memory SSH document; write authority is explicit and never local.
RemoteDirectory(Box<RemoteDirectory>)
A remote directory’s real, read-only listing buffer.
Container
A file inside a container: readonly (DC1b refuses writes); the path names the container’s filesystem — never a local path.
Surface(Box<GitSurface>)
A git-memory surface: job-owned content, readonly.
Output
:!cmd output / help: named virtual content, readonly.
Trait Implementations§
Source§impl Clone for DocumentSource
impl Clone for DocumentSource
Source§fn clone(&self) -> DocumentSource
fn clone(&self) -> DocumentSource
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for DocumentSource
impl !UnwindSafe for DocumentSource
impl Freeze for DocumentSource
impl Send for DocumentSource
impl Sync for DocumentSource
impl Unpin for DocumentSource
impl UnsafeUnpin for DocumentSource
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