pub struct RolePatterns {
pub fg: Pattern,
pub bg: Option<Pattern>,
}Expand description
A role’s two patterns: fg for what is drawn in its colour (a glyph, a
rectangle, a sprite painted in it), bg for a cell’s background in it
(fg again, if the map doesn’t say).
Fields§
§fg: PatternWhat is drawn in the role’s colour.
bg: Option<Pattern>A cell’s background in the role’s colour.
Implementations§
Source§impl RolePatterns
impl RolePatterns
Sourcepub const fn new(fg: Pattern, bg: Pattern) -> RolePatterns
pub const fn new(fg: Pattern, bg: Pattern) -> RolePatterns
fg, with bg behind.
Sourcepub fn background(&self) -> Pattern
pub fn background(&self) -> Pattern
The background pattern: bg, or else fg.
Trait Implementations§
Source§impl Clone for RolePatterns
impl Clone for RolePatterns
Source§fn clone(&self) -> RolePatterns
fn clone(&self) -> RolePatterns
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 moreimpl Copy for RolePatterns
Source§impl Debug for RolePatterns
impl Debug for RolePatterns
Source§impl<'de> Deserialize<'de> for RolePatterns
impl<'de> Deserialize<'de> for RolePatterns
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RolePatterns, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RolePatterns, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for RolePatterns
Source§impl PartialEq for RolePatterns
impl PartialEq for RolePatterns
Source§impl Serialize for RolePatterns
impl Serialize for RolePatterns
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for RolePatterns
Auto Trait Implementations§
impl Freeze for RolePatterns
impl RefUnwindSafe for RolePatterns
impl Send for RolePatterns
impl Sync for RolePatterns
impl Unpin for RolePatterns
impl UnsafeUnpin for RolePatterns
impl UnwindSafe for RolePatterns
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