pub struct TextRun {
pub text: String,
pub class: Vec<String>,
pub time: Option<RunTime>,
pub style: Option<TextRunStyle>,
}Expand description
A piece of a text with its own style, that animators’ Class and Timing selectors can pick.
Fields§
§text: StringNon-empty; \n starts a line. A grapheme cluster spanning two runs belongs to the run
holding its first byte.
class: Vec<String>Names Class selectors match, each 1 to 64 bytes of A-Z, a-z, 0-9, _ and -; at
most MAX_RUN_CLASSES.
time: Option<RunTime>When the run is said, from the holder’s start (a caption cue’s start, or a text generator’s picture time zero).
style: Option<TextRunStyle>Changes to the holder’s style for this run’s characters.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TextRun
impl<'de> Deserialize<'de> for TextRun
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for TextRun
Auto Trait Implementations§
impl Forget for TextRun
impl Freeze for TextRunwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<Keyframe<f32>>: Freeze,
*const DataBinding is !null: Freeze,
PhantomData<DataBinding>: Freeze,
PhantomData<GradientStop>: Freeze,
PhantomData<TextStroke>: Freeze,
impl Move for TextRun
impl RefUnwindSafe for TextRun
impl Send for TextRun
impl Sync for TextRun
impl Unpin for TextRun
impl UnsafeUnpin for TextRunwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<Keyframe<f32>>: UnsafeUnpin,
*const DataBinding is !null: UnsafeUnpin,
PhantomData<DataBinding>: UnsafeUnpin,
PhantomData<GradientStop>: UnsafeUnpin,
PhantomData<TextStroke>: UnsafeUnpin,
impl UnwindSafe for TextRun
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