pub struct PerColor<T>(/* private fields */);Expand description
A pair of values, one per Color.
Use this anywhere two per-colour values would otherwise become two named
fields: it makes for color in Color::ALL work, and it makes forgetting one
side impossible.
Implementations§
Trait Implementations§
impl<T: Copy> Copy for PerColor<T>
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for PerColor<T>
Available on crate feature serde only.
impl<'de, T: Deserialize<'de>> Deserialize<'de> for PerColor<T>
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl<T: Eq> Eq for PerColor<T>
impl<T: PartialEq> StructuralPartialEq for PerColor<T>
Auto Trait Implementations§
impl<T> Freeze for PerColor<T>where
T: Freeze,
impl<T> RefUnwindSafe for PerColor<T>where
T: RefUnwindSafe,
impl<T> Send for PerColor<T>where
T: Send,
impl<T> Sync for PerColor<T>where
T: Sync,
impl<T> Unpin for PerColor<T>where
T: Unpin,
impl<T> UnsafeUnpin for PerColor<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for PerColor<T>where
T: UnwindSafe,
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