Struct flo_canvas::SpriteId[][src]

pub struct SpriteId(pub u64);

Identifier of a canvas 'sprite'

A 'sprite' is just a placeholder for a set of pre-rendered actions (it's useful for things like images or drawings that are expected to repeat). Sprites survive layer and canvas clears so they can be re-used repeatedly. The drawing layer may cache these actions in order to render the sprite quickly.

Sprites are also faster to draw when rendering to a remote surface as they only need to be sent across once before they can be re-rendered as often as necessary.

Trait Implementations

impl CanvasEncoding<String> for SpriteId[src]

impl Clone for SpriteId[src]

impl Copy for SpriteId[src]

impl Debug for SpriteId[src]

impl<'de> Deserialize<'de> for SpriteId[src]

impl Eq for SpriteId[src]

impl Hash for SpriteId[src]

impl PartialEq<SpriteId> for SpriteId[src]

impl Serialize for SpriteId[src]

impl StructuralEq for SpriteId[src]

impl StructuralPartialEq for SpriteId[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.