Struct libbismuth::builders::TimedAnimationBuilder

source ·
pub struct TimedAnimationBuilder { /* private fields */ }
Expand description

A builder-pattern type to construct TimedAnimation objects.

Implementations§

source§

impl TimedAnimationBuilder

source

pub fn alternate(self, alternate: bool) -> Self

Whether the animation changes direction on every iteration.

source

pub fn duration(self, duration: u32) -> Self

Duration of the animation, in milliseconds.

Describes how much time the animation will take.

If the animation repeats more than once, describes the duration of one iteration.

source

pub fn easing(self, easing: Easing) -> Self

Easing function used in the animation.

Describes the curve the value is interpolated on.

See Easing for the description of specific easing functions.

source

pub fn repeat_count(self, repeat_count: u32) -> Self

Number of times the animation will play.

If set to 0, the animation will repeat endlessly.

source

pub fn reverse(self, reverse: bool) -> Self

Whether the animation plays backwards.

source

pub fn value_from(self, value_from: f64) -> Self

The value to animate from.

The animation will start at this value and end at value-to.

If reverse is TRUE, the animation will end at this value instead.

source

pub fn value_to(self, value_to: f64) -> Self

The value to animate to.

The animation will start at value-from and end at this value.

If reverse is TRUE, the animation will start at this value instead.

source

pub fn target(self, target: &impl IsA<AnimationTarget>) -> Self

The target to animate.

source

pub fn widget(self, widget: &impl IsA<Widget>) -> Self

The animation widget.

It provides the frame clock for the animation. It’s not strictly necessary for this widget to be same as the one being animated.

The widget must be mapped in order for the animation to work. If it’s not mapped, or if it gets unmapped during an ongoing animation, the animation will be automatically skipped.

source

pub fn build(self) -> TimedAnimation

Build the TimedAnimation.

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

§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

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

§

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.