Skip to main content

MathPrimitiveOptions

Struct MathPrimitiveOptions 

Source
pub struct MathPrimitiveOptions {
Show 38 fields pub bounded: bool, pub mode: Option<String>, pub before_digest: Vec<BeforeDigestClosure>, pub after_digest: Vec<DigestionClosure>, pub before_construct: Vec<ConstructionClosure>, pub after_construct: Vec<ConstructionClosure>, pub is_prefix: bool, pub scope: Option<Scope>, pub font: Option<FontDirective>, pub require_math: bool, pub forbid_math: bool, pub locked: bool, pub alias: Option<String>, pub decl_id: Option<String>, pub replace: Option<String>, pub protected: bool, pub robust: bool, pub name: Option<String>, pub meaning: Option<String>, pub omcd: Option<String>, pub reversion: Option<Reversion>, pub sizer: Option<SizingClosure>, pub role: Option<String>, pub operator_role: Option<String>, pub reorder: bool, pub dual: bool, pub mathstyle: Option<String>, pub dynamic_mathstyle: bool, pub scriptpos: Option<String>, pub dynamic_scriptpos: bool, pub operator_scriptpos: Option<usize>, pub stretchy: Option<bool>, pub operator_stretchy: Option<bool>, pub nogroup: bool, pub hide_content_reversion: bool, pub revert_as: Option<Cow<'static, str>>, pub lpadding: Option<usize>, pub rpadding: Option<usize>,
}

Fields§

§bounded: bool§mode: Option<String>§before_digest: Vec<BeforeDigestClosure>§after_digest: Vec<DigestionClosure>§before_construct: Vec<ConstructionClosure>§after_construct: Vec<ConstructionClosure>§is_prefix: bool§scope: Option<Scope>§font: Option<FontDirective>§require_math: bool§forbid_math: bool§locked: bool§alias: Option<String>§decl_id: Option<String>§replace: Option<String>§protected: bool§robust: bool§name: Option<String>§meaning: Option<String>§omcd: Option<String>§reversion: Option<Reversion>§sizer: Option<SizingClosure>§role: Option<String>§operator_role: Option<String>§reorder: bool§dual: bool§mathstyle: Option<String>§dynamic_mathstyle: bool

Dynamic mathstyle: compute “display”/“text” based on current font mathstyle at invocation time Perl: mathstyle => &doVariablesizeOp

§scriptpos: Option<String>§dynamic_scriptpos: bool

Dynamic scriptpos: compute “mid”/“post” based on current font mathstyle at invocation time Perl: scriptpos => &doScriptpos

§operator_scriptpos: Option<usize>§stretchy: Option<bool>§operator_stretchy: Option<bool>§nogroup: bool§hide_content_reversion: bool§revert_as: Option<Cow<'static, str>>§lpadding: Option<usize>§rpadding: Option<usize>

Implementations§

Source§

impl MathPrimitiveOptions

Source

pub fn to_hash_stored(&self) -> HashMap<Stored>

Source

pub fn to_hash_stored_with_overrides( &self, mode_override: Option<&'static str>, mathstyle_override: Option<&'static str>, scriptpos_override: Option<&'static str>, ) -> HashMap<Stored>

Like to_hash_stored but applies per-invocation overrides without cloning the whole options. Used in DefMath closures (hot path — one call per math token invocation).

Source

pub fn has_complex_option(&self) -> bool

Checks if complex options are present, suggestive of using a Constructor instead of a Primitive

Trait Implementations§

Source§

impl Clone for MathPrimitiveOptions

Source§

fn clone(&self) -> MathPrimitiveOptions

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 Default for MathPrimitiveOptions

Source§

fn default() -> Self

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

impl PartialEq for MathPrimitiveOptions

Source§

fn eq(&self, other: &MathPrimitiveOptions) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. 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.