#[non_exhaustive]pub struct HostBox {
pub width: Length,
pub height: Length,
pub depth: Length,
pub runs: Vec<HostBoxRun>,
pub rules: Vec<HostBoxRule>,
}Expand description
A host laid out box, its runs and rules drawn relative to its baseline origin with y down.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.width: LengthWidth, which TeX spaces the box by.
height: LengthHeight above the baseline.
depth: LengthDepth below the baseline.
runs: Vec<HostBoxRun>Glyph runs drawn inside the box.
rules: Vec<HostBoxRule>Rules drawn inside the box.
Implementations§
Source§impl HostBox
impl HostBox
Sourcepub fn new(width: Length, height: Length, depth: Length) -> Self
pub fn new(width: Length, height: Length, depth: Length) -> Self
An empty box of the given size, a negative size is rejected with a warning when typeset.
Sourcepub fn with_run(self, run: HostBoxRun) -> Self
pub fn with_run(self, run: HostBoxRun) -> Self
Adds a glyph run and returns the box.
Sourcepub fn with_rule(self, rule: HostBoxRule) -> Self
pub fn with_rule(self, rule: HostBoxRule) -> Self
Adds a rule and returns the box.
Trait Implementations§
impl Eq for HostBox
impl StructuralPartialEq for HostBox
Auto Trait Implementations§
impl Freeze for HostBox
impl RefUnwindSafe for HostBox
impl Send for HostBox
impl Sync for HostBox
impl Unpin for HostBox
impl UnsafeUnpin for HostBox
impl UnwindSafe for HostBox
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