pub struct Caption {
pub words: Vec<CaptionWord>,
pub active_color: String,
pub mode: CaptionStyle,
pub max_width: Option<f32>,
pub pill_color: Option<String>,
pub style: CssStyle,
pub timing: TimingConfig,
pub timeline: Vec<TimelineStep>,
pub stagger: Option<f32>,
}caption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
Fields§
§words: Vec<CaptionWord>caption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
active_color: Stringcaption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
mode: CaptionStylecaption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
max_width: Option<f32>caption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
pill_color: Option<String>caption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
Pill background color behind the active word (word_pop /
karaoke_pop modes). Defaults to black at 70% opacity.
style: CssStylecaption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
timing: TimingConfigcaption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
timeline: Vec<TimelineStep>caption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
stagger: Option<f32>caption is a frozen composition. Compose a for-each over the words with start_at/end_at per word and an expression picking the active one instead — see crates/rustmotion/skills/rules/composition-recipes.md. Kept for compatibility; scheduled for removal in a future major version via rustmotion migrate (#335).
Trait Implementations§
Source§impl Animatable for Caption
impl Animatable for Caption
fn animation_effects(&self) -> &[AnimationEffect]
fn timeline_steps(&self) -> &[TimelineStep]
Source§impl<'de> Deserialize<'de> for Caption
impl<'de> Deserialize<'de> for Caption
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>,
Source§impl JsonSchema for Caption
impl JsonSchema for Caption
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl Painter for Caption
impl Painter for Caption
fn paint_content( &self, canvas: &Canvas, layout: &BoxLayout, _props: &AnimatedProperties, ctx: &PaintCtx, )
fn intrinsic_size( &self, _available: AvailableSize, _ctx: &MeasureCtx, ) -> Option<(f32, f32)>
Auto Trait Implementations§
impl Freeze for Caption
impl RefUnwindSafe for Caption
impl Send for Caption
impl Sync for Caption
impl Unpin for Caption
impl UnsafeUnpin for Caption
impl UnwindSafe for Caption
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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