[][src]Struct screeps_api::Badge

pub struct Badge {
    pub badge_type: BadgeType,
    pub color1: BadgeColor,
    pub color2: BadgeColor,
    pub color3: BadgeColor,
    pub param: i32,
    pub flip: bool,
}

Description of a user badge, contains information on how that badge should be drawn/colored.

Badges can be rendered as SVG by first filling the entire image with color1, filling the first path (defined by badge type) with color2, filling the second path with color3, and then cutting off corners to make the badge a round circle.

Fields

badge_type: BadgeType

Badge type, used for different badge formats

color1: BadgeColor

First color, use depends on badge type.

color2: BadgeColor

Second color, use depends on badge type.

color3: BadgeColor

Third color, use depends on badge type.

param: i32

Integer parameter to badge display, changes the shape of the badge in a different way depending on badge type.

flip: bool

Flips the badge either horizontally or vertically, depending on badge type.

Trait Implementations

impl PartialEq<Badge> for Badge[src]

impl Clone for Badge[src]

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

Performs copy-assignment from source. Read more

impl Eq for Badge[src]

impl Debug for Badge[src]

impl Hash for Badge[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Serialize for Badge[src]

impl<'de> Deserialize<'de> for Badge[src]

Auto Trait Implementations

impl Unpin for Badge

impl Sync for Badge

impl Send for Badge

impl RefUnwindSafe for Badge

impl UnwindSafe for Badge

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,