pub struct TimelineBuilder { /* private fields */ }Expand description
Collects tracks, audio and settings, then builds a Timeline.
Fluent methods retain failures and report them all from build; try_*
variants report immediately. Empty timelines last zero ticks; trailing gaps
contribute duration. Without duration the timeline lasts
until the end of its tracks and audio (including bus tails, rounded up to a
frame); an explicit duration clips or extends the tracks without retiming
their scenes.
Implementations§
Source§impl TimelineBuilder
impl TimelineBuilder
Sourcepub fn background(self, color: Color) -> Self
pub fn background(self, color: Color) -> Self
Adds a full-design background below every track; alpha is retained.
Sourcepub fn track(self, build: impl FnOnce(TrackBuilder) -> TrackBuilder) -> Self
pub fn track(self, build: impl FnOnce(TrackBuilder) -> TrackBuilder) -> Self
Constructs one track while accumulating all invalid operations.
Sourcepub fn try_track(
self,
build: impl FnOnce(TrackBuilder) -> Result<TrackBuilder>,
) -> Result<Self>
pub fn try_track( self, build: impl FnOnce(TrackBuilder) -> Result<TrackBuilder>, ) -> Result<Self>
Atomically builds one track; all tracks together admit at most 16384 clips, 256 tracks and 65536 frame-adjustment warnings per snapshot.
Sourcepub fn audio(self, clip: AudioClip) -> Self
pub fn audio(self, clip: AudioClip) -> Self
Adds timeline audio, deferring validation failures to build.
Sourcepub fn try_audio(self, clip: AudioClip) -> Result<Self>
pub fn try_audio(self, clip: AudioClip) -> Result<Self>
Adds audio without snapping its placement to the video grid. Audio extends the inferred duration to the next frame boundary, never trims its tail.
Sourcepub fn master(self, master: Master) -> Self
pub fn master(self, master: Master) -> Self
Sets optional master processing, shared by preview and export.
Sourcepub fn audio_bus(self, bus: AudioBus) -> Self
pub fn audio_bus(self, bus: AudioBus) -> Self
Declares a named offline submix before the master.
Sourcepub fn duration(self, duration: Duration) -> Self
pub fn duration(self, duration: Duration) -> Self
Overrides output duration, deferring validation failures to build.
Sourcepub fn try_duration(self, duration: Duration) -> Result<Self>
pub fn try_duration(self, duration: Duration) -> Result<Self>
Overrides total duration on the nearest frame grid; zero is intentionally empty.
Sourcepub fn build(self) -> Result<Timeline, ErrorReport>
pub fn build(self) -> Result<Timeline, ErrorReport>
Validates everything retained so far and freezes the timeline. All
deferred failures, invalid audio settings and invalid nested scenes are
reported together as one ErrorReport.