pub struct RusTeXFileSystem { /* private fields */ }Implementations§
Source§impl RusTeXFileSystem
impl RusTeXFileSystem
pub fn new_with_envs<I: IntoIterator<Item = (String, String)>>( pwd: PathBuf, envs: I, ) -> Self
pub fn add_file(&mut self, path: PathBuf, file_content: &str)
pub fn add_envs<I: IntoIterator<Item = (String, String)>>(&mut self, envs: I)
Trait Implementations§
Source§impl Clone for RusTeXFileSystem
impl Clone for RusTeXFileSystem
Source§fn clone(&self) -> RusTeXFileSystem
fn clone(&self) -> RusTeXFileSystem
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 FileSystem for RusTeXFileSystem
impl FileSystem for RusTeXFileSystem
Source§type File = VirtualFile<u8>
type File = VirtualFile<u8>
The type of files provided by this
FileSystem.Source§fn new(pwd: PathBuf) -> Self
fn new(pwd: PathBuf) -> Self
Creates a new
FileSystem with the given working directory.Source§fn ref_str(&self, id: <Self::File as File>::SourceRefID) -> &str
fn ref_str(&self, id: <Self::File as File>::SourceRefID) -> &str
Returns a human-readable representation of a
SourceRefID; e.g. the file name/path.Source§fn get<S: AsRef<str>>(&mut self, path: S) -> Self::File
fn get<S: AsRef<str>>(&mut self, path: S) -> Self::File
Returns the file with the given name in the file database.
May return nonexistent files in the CWD
Source§fn set_pwd(&mut self, pwd: PathBuf) -> PathBuf
fn set_pwd(&mut self, pwd: PathBuf) -> PathBuf
Sets the working directory of this
FileSystem, returning the old working directory
and updating the file database.Source§fn open_out(&mut self, idx: u8, file: Self::File)
fn open_out(&mut self, idx: u8, file: Self::File)
Opens the file with the given index for writing (
\openout).Source§fn open_in(&mut self, idx: u8, file: Self::File)
fn open_in(&mut self, idx: u8, file: Self::File)
Opens the file with the given index for reading (
\openin).Source§fn write<ET: EngineTypes, D: Display>(
&mut self,
idx: i64,
string: D,
newlinechar: Option<ET::Char>,
aux: &mut EngineAux<ET>,
)
fn write<ET: EngineTypes, D: Display>( &mut self, idx: i64, string: D, newlinechar: Option<ET::Char>, aux: &mut EngineAux<ET>, )
Writes the given string to the file with the given index (
\write).Source§fn read<ET: EngineTypes<Char = <Self::File as File>::Char>, F: FnMut(ET::Token)>(
&mut self,
idx: u8,
handler: &mut <ET::CSName as CSName<ET::Char>>::Handler,
state: &ET::State,
cont: F,
) -> TeXResult<(), ET>
fn read<ET: EngineTypes<Char = <Self::File as File>::Char>, F: FnMut(ET::Token)>( &mut self, idx: u8, handler: &mut <ET::CSName as CSName<ET::Char>>::Handler, state: &ET::State, cont: F, ) -> TeXResult<(), ET>
Reads a line from the file with the given index and current
CategoryCodeScheme (\read),
respecting groups (i.e. will continue reading at the end of a line until all open groups are closed).Auto Trait Implementations§
impl Freeze for RusTeXFileSystem
impl RefUnwindSafe for RusTeXFileSystem
impl Send for RusTeXFileSystem
impl Sync for RusTeXFileSystem
impl Unpin for RusTeXFileSystem
impl UnsafeUnpin for RusTeXFileSystem
impl UnwindSafe for RusTeXFileSystem
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 more