Struct tic80::SpriteIdx

source ·
pub struct SpriteIdx<T, V> {
    pub idx: V,
    /* private fields */
}

Fields§

§idx: V

Implementations§

source§

impl SpriteIdx<Bpp4, UInt<u16, 9>>

source

pub fn bpp4<T>(v: T) -> Self
where T: TryInto<u16> + Debug,

source§

impl SpriteIdx<Bpp2, UInt<u16, 10>>

source

pub fn bpp2<T>(v: T) -> Self
where T: TryInto<u16> + Debug,

source§

impl SpriteIdx<Bpp1, UInt<u16, 11>>

source

pub fn bpp1<T>(v: T) -> Self
where T: TryInto<u16> + Debug,

Trait Implementations§

source§

impl<T: Clone, V: Clone> Clone for SpriteIdx<T, V>

source§

fn clone(&self) -> SpriteIdx<T, V>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug, V: Debug> Debug for SpriteIdx<T, V>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Index<SpriteIdx<Bpp1, UInt<u16, 11>>> for TilesSpriteBpp

§

type Output = Tile<<Bpp1 as Bpp>::Tile, Bpp1>

The returned type after indexing.
source§

fn index(&self, index: SpriteIdxBpp1) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<SpriteIdx<Bpp2, UInt<u16, 10>>> for TilesSpriteBpp

§

type Output = Tile<<Bpp2 as Bpp>::Tile, Bpp2>

The returned type after indexing.
source§

fn index(&self, index: SpriteIdxBpp2) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl Index<SpriteIdx<Bpp4, UInt<u16, 9>>> for TilesSpriteBpp

§

type Output = Tile<<Bpp4 as Bpp>::Tile, Bpp4>

The returned type after indexing.
source§

fn index(&self, index: SpriteIdxBpp4) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<SpriteIdx<Bpp1, UInt<u16, 11>>> for TilesSpriteBpp

source§

fn index_mut(&mut self, index: SpriteIdxBpp1) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<SpriteIdx<Bpp2, UInt<u16, 10>>> for TilesSpriteBpp

source§

fn index_mut(&mut self, index: SpriteIdxBpp2) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl IndexMut<SpriteIdx<Bpp4, UInt<u16, 9>>> for TilesSpriteBpp

source§

fn index_mut(&mut self, index: SpriteIdxBpp4) -> &mut Self::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl TryFrom<SpriteIdx<Bpp1, UInt<u16, 11>>> for MouseSprite

§

type Error = ()

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

fn try_from(f: SpriteIdxBpp1) -> Result<MouseSprite, Self::Error>

Performs the conversion.
source§

impl TryFrom<SpriteIdx<Bpp2, UInt<u16, 10>>> for MouseSprite

§

type Error = ()

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

fn try_from(f: SpriteIdxBpp2) -> Result<MouseSprite, Self::Error>

Performs the conversion.
source§

impl TryFrom<SpriteIdx<Bpp4, UInt<u16, 9>>> for MouseSprite

§

type Error = ()

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

fn try_from(f: SpriteIdxBpp4) -> Result<MouseSprite, Self::Error>

Performs the conversion.
source§

impl<T, V> TryFrom<u16> for SpriteIdx<T, V>
where T: Bpp, V: Number,

§

type Error = ()

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

fn try_from(v: u16) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl<T: Copy, V: Copy> Copy for SpriteIdx<T, V>

Auto Trait Implementations§

§

impl<T, V> RefUnwindSafe for SpriteIdx<T, V>

§

impl<T, V> Send for SpriteIdx<T, V>
where T: Send, V: Send,

§

impl<T, V> Sync for SpriteIdx<T, V>
where T: Sync, V: Sync,

§

impl<T, V> Unpin for SpriteIdx<T, V>
where T: Unpin, V: Unpin,

§

impl<T, V> UnwindSafe for SpriteIdx<T, V>
where T: UnwindSafe, V: UnwindSafe,

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> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.