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

pub struct IoSetup {
    pub bundle: Option<Box<dyn 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

bundle: Option<Box<dyn Bundle>>mem: MemoryIoformat_cache: Option<FormatCache>

Implementations

impl IoSetup[src]

pub fn as_stack(&mut self) -> IoStack<'_>[src]

pub fn as_stack_for_format<'a>(
    &'a mut self,
    format_file_name: &str
) -> IoStack<'a>
[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 !RefUnwindSafe for IoSetup

impl !Send for IoSetup

impl !Sync for IoSetup

impl Unpin for IoSetup

impl !UnwindSafe for IoSetup

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Err = <U as TryFrom<T>>::Err

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,