[][src]Enum tiny_rpg::entity::Skin

pub enum Skin {
    RGB(u8u8u8),
}

The possible skins in the game, again could be a trait. For now only has RGB with plans for RGBA very soon.

Variants

RGB(u8u8u8)

RGB rectangle. uses a tuple of (r, g, b) to create rectangles with colour.

Methods

impl Skin[src]

Implementations of Skin related to rgb and rgba.

pub fn get_rgb(&self) -> Result<Skin, &'static str>[src]

Gets the rgb value if it is rgb, otherwise returns an error.

pub fn get_rgb_colors(&self) -> Result<(u8, u8, u8), &'static str>[src]

Just gets the pure values from the rgb as a tuple instead of surrounding it in a skin like get_rgb. Again, results in an error if not rgb.

Trait Implementations

impl Clone for Skin[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Skin> for Skin[src]

impl Copy for Skin[src]

impl Eq for Skin[src]

impl Debug for Skin[src]

Auto Trait Implementations

impl Sync for Skin

impl Send for Skin

impl Unpin for Skin

impl RefUnwindSafe for Skin

impl UnwindSafe for Skin

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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

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

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.

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

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

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