Skip to main content

TrackBuilder

Struct TrackBuilder 

Source
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

Source

pub fn push(self, scene: impl Scene + 'static) -> Self

Appends a finite scene, retaining invalid input for validate().

Source

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.

Source

pub fn push_for(self, duration: Duration, scene: impl Scene + 'static) -> Self

Appends a scene at the cursor for duration, whatever its natural duration.

Source

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.

Source

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.

Source

pub fn try_push_for( self, duration: Duration, scene: impl Scene + 'static, ) -> Result<Self>

Immediately checks and appends a scene for duration.

Source

pub fn try_place_for( self, start: Time, duration: Duration, scene: impl Scene + 'static, ) -> Result<Self>

Immediately checks and places a scene for duration.

Source

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.

Source

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.

Source

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.

Source

pub fn place_timeline(self, start: Time, child: Timeline) -> Self

Places a nested timeline at an absolute time, like nest.

Source

pub fn try_nest(self, child: Timeline) -> Result<Self>

Immediately checks and appends a nested timeline at the cursor.

Source

pub fn try_nest_for(self, duration: Duration, child: Timeline) -> Result<Self>

Immediately checks and appends a nested timeline with an explicit duration.

Source

pub fn try_place_timeline(self, start: Time, child: Timeline) -> Result<Self>

Immediately checks and places a nested timeline.

Source

pub fn transition( self, effect: impl Transition + 'static, duration: Duration, ) -> Self

Adds an adjacent transition, retaining invalid input for validate().

Source

pub fn place(self, start: Time, scene: impl Scene + 'static) -> Self

Places a scene at absolute ticks, retaining invalid input for validate().

Source

pub fn gap(self, duration: Duration) -> Self

Advances the cursor, retaining invalid input for validate().

Source

pub fn try_transition( self, effect: impl Transition + 'static, duration: Duration, ) -> Result<Self>

Immediately checks and applies one adjacent transition.

Source

pub fn try_place(self, start: Time, scene: impl Scene + 'static) -> Result<Self>

Immediately checks and places one scene.

Source

pub fn try_gap(self, duration: Duration) -> Result<Self>

Immediately checks and advances the cursor.

Source

pub fn try_push(self, scene: impl Scene + 'static) -> Result<Self>

Appends at the requested cursor; finite positive Scene::duration is required.

Source

pub fn cursor(&self) -> Time

Requested append position, before frame alignment.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.