pub enum TextContent {
Plain(String),
Runs(Vec<TextRun>),
}Expand description
A text: one string, or runs whose texts joined are the text.
Written as "Hello" or [{ "text": "Hel" }, { "text": "lo", "class": ["key"] }].
Variants§
Plain(String)
One string; \n starts a line.
Runs(Vec<TextRun>)
Runs in order; their texts joined are the text.
Implementations§
Source§impl TextContent
impl TextContent
Sourcepub fn has_run_styles(&self) -> bool
pub fn has_run_styles(&self) -> bool
Whether any run has a style.
Trait Implementations§
Source§impl AnimatedValue for TextContent
impl AnimatedValue for TextContent
Source§const ACCEPTS_DATA: bool = false
const ACCEPTS_DATA: bool = false
Whether the type takes the
data value mode.Source§const INTERPOLATES: bool = false
const INTERPOLATES: bool = false
Whether keyframes of the type can interpolate; those of the others only hold.
Source§const OFFSETS: bool = false
const OFFSETS: bool = false
Whether two values of the type have a difference to add: what
repeat_offset needs.Source§const VALUE_CURVES: bool = false
const VALUE_CURVES: bool = false
Whether a keyframe of the type can start a value curve (
ValueBezier).Source§const SPLIT: Option<(usize, usize)> = None
const SPLIT: Option<(usize, usize)> = None
The fewest and the most channels the type’s
split mode takes, or None for a type
without the mode.Source§fn takes_value_curve(&self) -> bool
fn takes_value_curve(&self) -> bool
Whether a keyframe holding this value may start or end a value curve.
Source§fn extrapolates(&self, extrapolation: Extrapolation) -> bool
fn extrapolates(&self, extrapolation: Extrapolation) -> bool
Whether keyframes holding this value may extrapolate by
extrapolation.Source§impl Clone for TextContent
impl Clone for TextContent
Source§impl Debug for TextContent
impl Debug for TextContent
Source§impl Default for TextContent
impl Default for TextContent
Source§impl<'de> Deserialize<'de> for TextContent
impl<'de> Deserialize<'de> for TextContent
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&str> for TextContent
impl From<&str> for TextContent
Source§impl From<String> for TextContent
impl From<String> for TextContent
Source§impl PartialEq for TextContent
impl PartialEq for TextContent
Source§impl PartialEq<&str> for TextContent
impl PartialEq<&str> for TextContent
Source§impl PartialEq<str> for TextContent
Compares the whole text, runs joined, with a string.
impl PartialEq<str> for TextContent
Compares the whole text, runs joined, with a string.
Source§impl Serialize for TextContent
impl Serialize for TextContent
impl StructuralPartialEq for TextContent
Auto Trait Implementations§
impl Forget for TextContent
impl Freeze for TextContent
impl Move for TextContent
impl RefUnwindSafe for TextContent
impl Send for TextContent
impl Sync for TextContent
impl Unpin for TextContent
impl UnsafeUnpin for TextContentwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<TextRun>: UnsafeUnpin,
impl UnwindSafe for TextContent
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