[][src]Trait tectonic_io_base::IoProvider

pub trait IoProvider: AsIoProviderMut {
    pub fn output_open_name(
        &mut self,
        _name: &OsStr
    ) -> OpenResult<OutputHandle> { ... }
pub fn output_open_stdout(&mut self) -> OpenResult<OutputHandle> { ... }
pub fn input_open_name(
        &mut self,
        _name: &OsStr,
        _status: &mut dyn StatusBackend
    ) -> OpenResult<InputHandle> { ... }
pub fn input_open_primary(
        &mut self,
        _status: &mut dyn StatusBackend
    ) -> OpenResult<InputHandle> { ... }
pub fn input_open_format(
        &mut self,
        name: &OsStr,
        status: &mut dyn StatusBackend
    ) -> OpenResult<InputHandle> { ... }
pub fn write_format(
        &mut self,
        _name: &str,
        _data: &[u8],
        _status: &mut dyn StatusBackend
    ) -> Result<()> { ... } }

A trait for types that can read or write files needed by the TeX engine.

An IO provider is a source of handles. One wrinkle is that it's good to be able to distinguish between unavailability of a given name and error accessing it. We take file paths as OsStrs, although since we parse input files as Unicode it may not be possible to actually express zany non-Unicode Unix paths inside the engine.

Provided methods

pub fn output_open_name(&mut self, _name: &OsStr) -> OpenResult<OutputHandle>[src]

Open the named file for output.

pub fn output_open_stdout(&mut self) -> OpenResult<OutputHandle>[src]

Open the standard output stream.

pub fn input_open_name(
    &mut self,
    _name: &OsStr,
    _status: &mut dyn StatusBackend
) -> OpenResult<InputHandle>
[src]

Open the named file for input.

pub fn input_open_primary(
    &mut self,
    _status: &mut dyn StatusBackend
) -> OpenResult<InputHandle>
[src]

Open the "primary" input file, which in the context of TeX is the main input that it's given. When the build is being done using the filesystem and the input is a file on the filesystem, this function isn't necesssarily that important, but those conditions don't always hold.

pub fn input_open_format(
    &mut self,
    name: &OsStr,
    status: &mut dyn StatusBackend
) -> OpenResult<InputHandle>
[src]

Open a format file with the specified name. Format files have a specialized entry point because IOProviders may wish to handle them specially: namely, to munge the filename to one that includes the current version of the Tectonic engine, since the format contents depend sensitively on the engine internals.

pub fn write_format(
    &mut self,
    _name: &str,
    _data: &[u8],
    _status: &mut dyn StatusBackend
) -> Result<()>
[src]

Save an a format dump in some way that this provider may be able to recover in the future. This awkward interface is needed for to write formats with their special munged file names.

Loading content...

Implementations on Foreign Types

impl<P: IoProvider + ?Sized> IoProvider for Box<P>[src]

Loading content...

Implementors

impl IoProvider for FilesystemIo[src]

impl IoProvider for FilesystemPrimaryInputIo[src]

impl IoProvider for BufferedPrimaryIo[src]

impl IoProvider for GenuineStdoutIo[src]

impl IoProvider for SingleInputFileIo[src]

impl<'a> IoProvider for IoStack<'a>[src]

Loading content...