Skip to main content

DefaultEngine

Struct DefaultEngine 

Source
pub struct DefaultEngine<ET: EngineTypes> {
    pub aux: EngineAux<ET>,
    pub state: ET::State,
    pub filesystem: ET::FileSystem,
    pub fontsystem: ET::FontSystem,
    pub mouth: ET::Mouth,
    pub gullet: ET::Gullet,
    pub stomach: ET::Stomach,
}
Expand description

Default implementation of a TeXEngine for the provided EngineTypes.

Fields§

§aux: EngineAux<ET>§state: ET::State§filesystem: ET::FileSystem§fontsystem: ET::FontSystem§mouth: ET::Mouth§gullet: ET::Gullet§stomach: ET::Stomach

Trait Implementations§

Source§

impl<ET: EngineTypes> Default for DefaultEngine<ET>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl<ET: EngineTypes> TeXEngine for DefaultEngine<ET>

Source§

type Types = ET

Source§

fn get_engine_refs(&mut self) -> EngineReferences<'_, ET>

Returns mutable references to the components of the engine.
Source§

fn init_file(&mut self, s: &str) -> TeXResult<(), Self::Types>

Initializes the engine with a file, e.g. latex.ltx or pdftex.cfg. Read more
Source§

fn run<F: FnMut(&mut EngineReferences<'_, Self::Types>, VNode<Self::Types>) -> TeXResult<(), Self::Types>>( &mut self, f: F, ) -> TeXResult<(), Self::Types>

Errors Read more
Source§

fn do_file_default<F: FnMut(&mut EngineReferences<'_, Self::Types>, VNode<Self::Types>) -> TeXResult<(), Self::Types>>( &mut self, s: &str, f: F, ) -> TeXResult<(), Self::Types>

Compile a .tex file. All finished pages are passed to the provided continuation. Read more
Source§

fn initialize_tex_primitives(&mut self)

Registers all primitives of plain TeX and sets the default variables.
Source§

fn initialize_plain_tex(&mut self) -> TeXResult<(), Self::Types>

Initialize the engine by processing plain.tex. Read more
Source§

fn initialize_etex_primitives(&mut self)

Registers all primitives of plain TeX, e-TeX and sets the default variables.
Source§

fn initialize_eplain_tex(&mut self) -> TeXResult<(), Self::Types>

Initialize the engine by processing eplain.tex. Read more
Source§

fn load_latex(&mut self) -> TeXResult<(), Self::Types>

Initialized the engine by processing latex.ltx. Only call this (for modern LaTeX setups) after calling initialize_etex_primitives first. Read more

Auto Trait Implementations§

§

impl<ET> Freeze for DefaultEngine<ET>

§

impl<ET> RefUnwindSafe for DefaultEngine<ET>

§

impl<ET> Send for DefaultEngine<ET>

§

impl<ET> Sync for DefaultEngine<ET>

§

impl<ET> Unpin for DefaultEngine<ET>

§

impl<ET> UnsafeUnpin for DefaultEngine<ET>

§

impl<ET> UnwindSafe for DefaultEngine<ET>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<ET, Err, A> IntoErr<ET, Err> for A
where ET: EngineTypes, Err: From<A>,

Source§

fn into_err( self, _aux: &EngineAux<ET>, _state: &<ET as EngineTypes>::State, ) -> Err

§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<R, P> ReadPrimitive<R> for P
where R: Read + ReadEndian<P>, P: Default,

Source§

fn read_from_little_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
Source§

fn read_from_big_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
Source§

fn read_from_native_endian(read: &mut R) -> Result<Self, Error>

Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more