Struct tectonic::io::setup::IoSetup[][src]

pub struct IoSetup {
    pub bundle: Option<Box<Bundle>>,
    pub mem: MemoryIo,
    pub format_cache: Option<FormatCache>,
    // some fields omitted
}

An IoSetup is essentially a typed, structured version of an IoStack.

The IoStack struct must necessarily erase types (i.e., turn I/O layers into IoProvider trait objects). But, between invocations of various engines, we want to look at our individual typed I/O providers and interrogate them (i.e., see what files were created in the memory layer). The IoSetup struct helps us maintain detailed knowledge of types while creating an IoStack when needed.

The IoStack produced by an IoSetup follows a particular structure: memory I/O backed by filesystem I/O, backed by an optional Bundle. This way, any newly created files will be created in memory, and you can examine them by poking at the mem field.

Fields

Methods

impl IoSetup
[src]

Creates an IoStack for the specific purpose of writing out a format file.

This differs from IoSetup::as_stack in two ways:

  • the primary input is not used here; instead, this method provides a "dummy" primary input file containing only "\input format-file-name.tex"
  • the filesystem is not included, and so only files that are present in the bundle can have an effect on the format file.

You can use the resulting IoStack to run the TeX engine with initex_mode set to true; then the resulting format file(s) can be read from the memory I/O layer (i.e. self.mem).

Auto Trait Implementations

impl !Send for IoSetup

impl !Sync for IoSetup