Enum BoxKind
pub enum BoxKind {
Glyph {
ch: char,
size: f32,
},
Name {
text: String,
size: f32,
},
FracBar,
SqrtSign {
over_w: f64,
size: f32,
},
Paren {
open: bool,
size: f32,
},
Delimiter {
ch: char,
size: f32,
},
Accent {
mark: char,
size: f32,
},
}Expand description
What a laid-out box paints.
Variants§
Glyph
A glyph (digit / letter / operator) drawn at size.
Name
An upright function name (sin, cos, …).
FracBar
The horizontal bar of a fraction.
SqrtSign
The √ sign + its overbar; over_w is the radicand span the bar
must cover, starting at the box’s right edge.
Paren
A vector parenthesis constructed to exactly span this box. It is not
a vertically-scaled font glyph: scaling a normal ( distorts its
stroke and, more importantly, makes its optical centre depend on the
font glyph’s baseline rather than on the enclosed expression.
Delimiter
A scalable TeX delimiter ([], {}, |, ‖, ⌊⌋, ⌈⌉, ⟨⟩).
Accent
Close-fitting accent path spanning w (¯, ˆ, ˜, arrows, dots).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BoxKind
impl RefUnwindSafe for BoxKind
impl Send for BoxKind
impl Sync for BoxKind
impl Unpin for BoxKind
impl UnsafeUnpin for BoxKind
impl UnwindSafe for BoxKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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