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: boolTrait 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
Copyable identifier for this file to be used in SourceReferences.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.Source§impl<C: Character> FileWithMD5 for VirtualFile<C>
impl<C: Character> FileWithMD5 for VirtualFile<C>
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> UnsafeUnpin 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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
impl<ET, Err, A> IntoErr<ET, Err> for Awhere
ET: EngineTypes,
Err: From<A>,
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.