Crate tectonic_io_base

Source
Expand description

Tectonic’s pluggable I/O backend.

This crates defines the core traits and types used by Tectonic’s I/O subsystem, and provides implementations for common stdlib types. It provides a simplified I/O model compatible with TeX’s usage patterns, as encapsulated in the IoProvider trait. Files are exposed as InputHandle or OutputHandle structs, which add a layer of bookkeeping to allow the higher levels of Tectonic to determine when the engine needs to be re-run.

Modules§

app_dirs
Default directories for per-user Tectonic files.
digest
Helpers to tidy up the computation of digests in various places.
filesystem
Tectonic I/O implementations for std::fs types.
flate2
Tectonic I/O implementations for types provided by flate2.
stack
An “I/O stack” is an I/O provider that delegates requests to a series of sub-providers in turn.
stdstreams
Tectonic I/O trait implementations for the standard I/O streams.

Structs§

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.
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.
TectonicIoError
Errors that are generic to Tectonic’s framework, but not capturable as IoErrors.

Traits§

AsIoProviderMut
A hack to allow casting of Bundles to IoProviders.
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.