Skip to main content

ConstructorOptions

Struct ConstructorOptions 

Source
pub struct ConstructorOptions {
Show 23 fields pub nargs: Option<usize>, pub bounded: bool, pub mode: Option<String>, pub sizer: Option<SizingClosure>, pub before_digest: Vec<BeforeDigestClosure>, pub after_digest: Vec<DigestionClosure>, pub before_construct: Vec<ConstructionClosure>, pub after_construct: Vec<ConstructionClosure>, pub enter_horizontal: bool, pub leave_horizontal: bool, pub require_math: bool, pub forbid_math: bool, pub properties: PropertiesClosure, pub capture_body: bool, pub font: Option<FontDirective>, pub after_digest_begin: Vec<DigestionClosure>, pub before_digest_end: Vec<BeforeDigestClosure>, pub after_digest_body: Vec<DigestionClosure>, pub reversion: Option<Reversion>, pub scope: Option<Scope>, pub robust: bool, pub locked: bool, pub alias: Option<String>,
}
Expand description

configuration for creating a new Constructor

Fields§

§nargs: Option<usize>

number of arguments (if any)

§bounded: bool

bouded mode (default: false)

§mode: Option<String>

begin a named mode

§sizer: Option<SizingClosure>

a SizingClosure to estimate the size of the digested box

§before_digest: Vec<BeforeDigestClosure>

custom code to run immediately before the digestion phase

§after_digest: Vec<DigestionClosure>

custom code to run immediately after the digestion phase

§before_construct: Vec<ConstructionClosure>

custom code to run immediately before the construction phase

§after_construct: Vec<ConstructionClosure>

custom code to run immediately after the construction phase

§enter_horizontal: bool

switch to horizontal mode before digesting (Perl: enterHorizontal => 1)

§leave_horizontal: bool

switch to vertical mode before digesting (Perl: leaveHorizontal => 1)

§require_math: bool

requires to be used in math mode

§forbid_math: bool

forbids use in math mode

§properties: PropertiesClosure

custom directives for computing box properties

§capture_body: bool

should it capture the body as #body (default: false)

§font: Option<FontDirective>

specify a font to use, or instructions how to compute which font to use

§after_digest_begin: Vec<DigestionClosure>

custom code to run as digestion begins

§before_digest_end: Vec<BeforeDigestClosure>

custom code to run just before digestion ends

§after_digest_body: Vec<DigestionClosure>

custom code to run after #body has been digested

§reversion: Option<Reversion>

provide tokens to revert to, or custom code for computing them

§scope: Option<Scope>

Local/Global scope of installing this definition (default: Local)

§robust: bool

is this a robust command sequence (default: false)

§locked: bool

lock the definition for raw TeX overrides (default: false)

§alias: Option<String>

alternative (command sequence) name, used for reversion

Trait Implementations§

Source§

impl Clone for ConstructorOptions

Source§

fn clone(&self) -> ConstructorOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConstructorOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ConstructorOptions

Source§

fn default() -> Self

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

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.