[−][src]Enum tiny_rpg::entity::Skin
The possible skins in the game, again could be a trait. For now only has RGB with plans for RGBA very soon.
Variants
RGB(u8, u8, u8)
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 Copy for Skin
[src]
impl Clone for Skin
[src]
fn clone(&self) -> 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 Eq for Skin
[src]
impl Debug for Skin
[src]
Auto Trait Implementations
impl Sync for Skin
impl Unpin for Skin
impl Send for Skin
impl UnwindSafe for Skin
impl RefUnwindSafe for Skin
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,