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 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.