pub struct TrackBuilder { /* private fields */ }Expand description
Fluent scheduler with deferred diagnostics and immediate try_* alternatives. The requested cursor is not repeatedly rounded: each boundary is snapped once.
Implementations§
Source§impl TrackBuilder
impl TrackBuilder
Sourcepub fn push(self, scene: impl Scene + 'static) -> Self
pub fn push(self, scene: impl Scene + 'static) -> Self
Appends a finite scene, retaining invalid input for validate().
Sourcepub fn scene<Output: IntoSceneOutput + 'static>(
self,
duration: Duration,
build: impl Fn(&SceneContext<'_>) -> Output + Send + Sync + 'static,
) -> Self
pub fn scene<Output: IntoSceneOutput + 'static>( self, duration: Duration, build: impl Fn(&SceneContext<'_>) -> Output + Send + Sync + 'static, ) -> Self
Appends a finite authoring callback accepting drawables or Result outputs.
Sourcepub fn push_for(self, duration: Duration, scene: impl Scene + 'static) -> Self
pub fn push_for(self, duration: Duration, scene: impl Scene + 'static) -> Self
Appends a scene at the cursor for duration, whatever its natural duration.
Sourcepub fn place_for(
self,
start: Time,
duration: Duration,
scene: impl Scene + 'static,
) -> Self
pub fn place_for( self, start: Time, duration: Duration, scene: impl Scene + 'static, ) -> Self
Places a scene at absolute ticks for duration, whatever its natural duration.
Sourcepub fn push_trimmed(
self,
offset: Duration,
duration: Duration,
scene: impl Scene + 'static,
) -> Self
pub fn push_trimmed( self, offset: Duration, duration: Duration, scene: impl Scene + 'static, ) -> Self
Appends a scene at the cursor that starts offset into its own timeline.
Sourcepub fn try_push_for(
self,
duration: Duration,
scene: impl Scene + 'static,
) -> Result<Self>
pub fn try_push_for( self, duration: Duration, scene: impl Scene + 'static, ) -> Result<Self>
Immediately checks and appends a scene for duration.
Sourcepub fn try_place_for(
self,
start: Time,
duration: Duration,
scene: impl Scene + 'static,
) -> Result<Self>
pub fn try_place_for( self, start: Time, duration: Duration, scene: impl Scene + 'static, ) -> Result<Self>
Immediately checks and places a scene for duration.
Sourcepub fn try_push_trimmed(
self,
offset: Duration,
duration: Duration,
scene: impl Scene + 'static,
) -> Result<Self>
pub fn try_push_trimmed( self, offset: Duration, duration: Duration, scene: impl Scene + 'static, ) -> Result<Self>
Immediately checks and appends a scene that starts offset into its own timeline.
Sourcepub fn nest(self, child: Timeline) -> Self
pub fn nest(self, child: Timeline) -> Self
Appends a nested timeline at the cursor, using its own duration. Its picture is clipped and fitted into this timeline’s design space; its audio joins this timeline’s soundtrack, shifted and cropped to the clip.
Sourcepub fn nest_for(self, duration: Duration, child: Timeline) -> Self
pub fn nest_for(self, duration: Duration, child: Timeline) -> Self
Like nest with an explicit clip duration: the child’s picture
and audio are cropped to it, or padded with silence when it is longer.
Sourcepub fn place_timeline(self, start: Time, child: Timeline) -> Self
pub fn place_timeline(self, start: Time, child: Timeline) -> Self
Places a nested timeline at an absolute time, like nest.
Sourcepub fn try_nest(self, child: Timeline) -> Result<Self>
pub fn try_nest(self, child: Timeline) -> Result<Self>
Immediately checks and appends a nested timeline at the cursor.
Sourcepub fn try_nest_for(self, duration: Duration, child: Timeline) -> Result<Self>
pub fn try_nest_for(self, duration: Duration, child: Timeline) -> Result<Self>
Immediately checks and appends a nested timeline with an explicit duration.
Sourcepub fn try_place_timeline(self, start: Time, child: Timeline) -> Result<Self>
pub fn try_place_timeline(self, start: Time, child: Timeline) -> Result<Self>
Immediately checks and places a nested timeline.
Sourcepub fn transition(
self,
effect: impl Transition + 'static,
duration: Duration,
) -> Self
pub fn transition( self, effect: impl Transition + 'static, duration: Duration, ) -> Self
Adds an adjacent transition, retaining invalid input for validate().
Sourcepub fn place(self, start: Time, scene: impl Scene + 'static) -> Self
pub fn place(self, start: Time, scene: impl Scene + 'static) -> Self
Places a scene at absolute ticks, retaining invalid input for validate().
Sourcepub fn gap(self, duration: Duration) -> Self
pub fn gap(self, duration: Duration) -> Self
Advances the cursor, retaining invalid input for validate().
Sourcepub fn try_transition(
self,
effect: impl Transition + 'static,
duration: Duration,
) -> Result<Self>
pub fn try_transition( self, effect: impl Transition + 'static, duration: Duration, ) -> Result<Self>
Immediately checks and applies one adjacent transition.
Sourcepub fn try_place(self, start: Time, scene: impl Scene + 'static) -> Result<Self>
pub fn try_place(self, start: Time, scene: impl Scene + 'static) -> Result<Self>
Immediately checks and places one scene.
Sourcepub fn try_gap(self, duration: Duration) -> Result<Self>
pub fn try_gap(self, duration: Duration) -> Result<Self>
Immediately checks and advances the cursor.