Skip to main content

HFlip

Enum HFlip 

Source
pub enum HFlip {
    Dynamic(usize, Easing, i32, i32),
}
Expand description

HFlip event

Variants§

§

Dynamic(usize, Easing, i32, i32)

Trait Implementations§

Source§

impl Event for HFlip

Source§

fn to_line(&self) -> String

Source§

fn set_depth(&mut self, depth: usize)

Source§

fn get_start_time(&self) -> i32

Source§

fn get_end_time(&self) -> i32

Source§

impl Into<HFlip> for (i32, i32)

Creates a HFlip event with the timestamps

Uses a Linear easing

Example:

use osb::Sprite;

let start_time = 0;
let end_time = 1000;

let mut sprite = Sprite::new("res/sprite.png");
sprite.hflip_((start_time, end_time));
Source§

fn into(self) -> HFlip

Converts this type into the (usually inferred) input type.
Source§

impl Into<HFlip> for (Easing, i32, i32)

Creates a HFlip event with the easing and the timestamps

Example:

use osb::{Easing, Sprite};

let easing = Easing::Out;
let start_time = 0;
let end_time = 1000;

let mut sprite = Sprite::new("res/sprite.png");
sprite.hflip_((easing, start_time, end_time));
Source§

fn into(self) -> HFlip

Converts this type into the (usually inferred) input type.

Auto Trait Implementations§

§

impl Freeze for HFlip

§

impl RefUnwindSafe for HFlip

§

impl Send for HFlip

§

impl Sync for HFlip

§

impl Unpin for HFlip

§

impl UnsafeUnpin for HFlip

§

impl UnwindSafe for HFlip

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.