pub enum StateChange {
Font(Option<Font>),
Color(ColorChange),
Style(Style),
}
Expand description
Represents a state change for the following content.
State changes take effect for the current group nesting and all deeper groups.
State changes are not maintained across NewLine
and Alignment
events, and are also reset
when entering a new group that is not a Grouping::Normal
, or a Grouping::LeftRight
. The
exception to the latter is StateChange::Style
, which is maintained across all groups.
Variants§
Font(Option<Font>)
Changes the font of the content.
If the font is None
, then the default renderer font is used, otherwise the font is set to
the specified font.
Color(ColorChange)
Changes the color of the content.
Style(Style)
Changes the style of the content (mostly affects the sizing of the content).
Important: This state change does not affect scripts and root indices.
Trait Implementations§
Source§impl Clone for StateChange
impl Clone for StateChange
Source§fn clone(&self) -> StateChange
fn clone(&self) -> StateChange
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StateChange
impl Debug for StateChange
Source§impl PartialEq for StateChange
impl PartialEq for StateChange
impl Copy for StateChange
impl StructuralPartialEq for StateChange
Auto Trait Implementations§
impl Freeze for StateChange
impl RefUnwindSafe for StateChange
impl Send for StateChange
impl Sync for StateChange
impl Unpin for StateChange
impl UnwindSafe for StateChange
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