#[non_exhaustive]pub struct OneBitSkin {
pub palette_file: String,
pub palette: PaletteDef,
pub map_file: String,
pub map: PatternMapDef,
}Expand description
A skin’s one-bit look (GameTools::one_bit): its palette of roles
and the pattern map beside it (ADR-0008 §4). Build it with
OneBitSkin::new (ADR-0039).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.palette_file: StringThe palette’s file, as messages show it.
palette: PaletteDefThe palette: each role’s colour.
map_file: StringThe pattern map’s file, as messages show it
(files/palette@onebit.ron).
map: PatternMapDefThe pattern map.
Implementations§
Source§impl OneBitSkin
impl OneBitSkin
Sourcepub fn new(
palette_file: impl Into<String>,
palette: PaletteDef,
map_file: impl Into<String>,
map: PatternMapDef,
) -> Self
pub fn new( palette_file: impl Into<String>, palette: PaletteDef, map_file: impl Into<String>, map: PatternMapDef, ) -> Self
The palette palette from the file palette_file, and the pattern
map map from map_file.
Trait Implementations§
Source§impl Clone for OneBitSkin
impl Clone for OneBitSkin
Source§fn clone(&self) -> OneBitSkin
fn clone(&self) -> OneBitSkin
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OneBitSkin
impl Debug for OneBitSkin
impl Eq for OneBitSkin
Source§impl PartialEq for OneBitSkin
impl PartialEq for OneBitSkin
impl StructuralPartialEq for OneBitSkin
Auto Trait Implementations§
impl Freeze for OneBitSkin
impl RefUnwindSafe for OneBitSkin
impl Send for OneBitSkin
impl Sync for OneBitSkin
impl Unpin for OneBitSkin
impl UnsafeUnpin for OneBitSkin
impl UnwindSafe for OneBitSkin
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.