Struct theme2::PlayerColors
source · pub struct PlayerColors(pub Vec<PlayerColor>);
Expand description
A collection of colors that are used to color players in the editor.
The first color is always the local player’s color, usually a blue.
The rest of the default colors crisscross back and forth on the color wheel so that the colors are as distinct as possible.
Tuple Fields§
§0: Vec<PlayerColor>
Implementations§
source§impl PlayerColors
impl PlayerColors
pub fn local(&self) -> PlayerColor
pub fn absent(&self) -> PlayerColor
pub fn color_for_participant(&self, participant_index: u32) -> PlayerColor
Trait Implementations§
source§impl Clone for PlayerColors
impl Clone for PlayerColors
source§fn clone(&self) -> PlayerColors
fn clone(&self) -> PlayerColors
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for PlayerColors
impl Send for PlayerColors
impl Sync for PlayerColors
impl Unpin for PlayerColors
impl UnwindSafe for PlayerColors
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