Skip to main content

Module io

Module io 

Source
Expand description

Extensions to Tectonic’s pluggable I/O backend.

Re-exports§

pub use self::memory::MemoryIo;

Modules§

digest
Helpers to tidy up the computation of digests in various places.
format_cache
Code for locally caching compiled format files.
memory
MemoryIo is an IoProvider that stores “files” in in-memory buffers.

Structs§

DigestData
A wrapper for a fixed-size byte array representing a digest computed with the default implementation.
FilesystemIo
FilesystemIo is an I/O provider that reads, and optionally writes, files from a given root directory.
FilesystemPrimaryInputIo
FilesystemPrimaryInputIo is an I/O provider that provides the TeX “primary input” file off of the filesystem. This can pretty much be achieved with Filesystem I/O, but we need the “primary input” formalism to decently support processing if stdin, and by doing things this way we can handle paths on Unix systems that can’t be converted to UTF-8.
GenuineStdoutIo
GenuineStdoutIo provides a mechanism for the “stdout” output to actually go to the process’s stdout.
InputHandle
Input handles are basically Read objects with a few extras. We don’t require the standard io::Seek because we need to provide a dummy implementation for GZip streams, which we wouldn’t be allowed to do because both the trait and the target struct are outside of our crate.
IoStack
An IoStack is an IoProvider that delegates to an ordered list of subordinate IoProviders. It also checks the order in which files are read and written to detect “circular” access patterns that indicate whether we need to run multiple passes of the TeX engine.
OutputHandle
A handle for Tectonic output streams.

Enums§

InputOrigin
What kind of source an input file ultimately came from. We keep track of this in order to be able to emit Makefile-style dependencies for input files. Right now, we only provide enough options to achieve this goal; we could add more.
OpenResult
A convenience type for file-open operations when “not found” needs to be handled specially.

Traits§

InputFeatures
An extension to the basic Read trait supporting additional features needed for Tectonic’s I/O system.
IoProvider
A trait for types that can read or write files needed by the TeX engine.

Functions§

normalize_tex_path
Normalize a TeX path if possible, otherwise return the original path.
try_open_file
Try to open a file on the fileystem, returning an OpenResult type allowing easy handling if the file was not found.