pub struct VirtualFile<C: Character> {
pub path: PathBuf,
pub pipe: bool,
pub id: Option<SymbolU32>,
pub source: Option<Ptr<[TextLine<C>]>>,
pub exists: bool,
}
Expand description
A File
that may live in memory or on the physical file system.
Fields§
§path: PathBuf
§pipe: bool
§id: Option<SymbolU32>
§source: Option<Ptr<[TextLine<C>]>>
§exists: bool
Trait Implementations§
Source§impl<C: Clone + Character> Clone for VirtualFile<C>
impl<C: Clone + Character> Clone for VirtualFile<C>
Source§fn clone(&self) -> VirtualFile<C>
fn clone(&self) -> VirtualFile<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<C: Character> Display for VirtualFile<C>
impl<C: Character> Display for VirtualFile<C>
Source§impl<C: Character> File for VirtualFile<C>
impl<C: Character> File for VirtualFile<C>
Source§type LineSource = VirtualFileLineSource<C>
type LineSource = VirtualFileLineSource<C>
The type of line sources to be read from the file.
Source§type SourceRefID = Option<SymbolU32>
type SourceRefID = Option<SymbolU32>
A
Copy
able identifier for this file to be used in SourceReference
s.Source§fn sourceref(&self) -> Self::SourceRefID
fn sourceref(&self) -> Self::SourceRefID
Returns a
SourceRefID
for this file.Source§fn line_source(self) -> Result<Self::LineSource, PathBuf>
fn line_source(self) -> Result<Self::LineSource, PathBuf>
Returns a line source for this file. Used by a
Mouth
to read from this file.Auto Trait Implementations§
impl<C> Freeze for VirtualFile<C>
impl<C> RefUnwindSafe for VirtualFile<C>where
C: RefUnwindSafe,
impl<C> !Send for VirtualFile<C>
impl<C> !Sync for VirtualFile<C>
impl<C> Unpin for VirtualFile<C>
impl<C> UnwindSafe for VirtualFile<C>where
C: RefUnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more