mirror of
https://github.com/crossterm-rs/crossterm.git
synced 2025-09-29 05:52:08 +00:00
Add Hash
derive to style types (#1002)
This commit is contained in:
parent
8ee044d423
commit
fab72d12fe
@ -3,7 +3,7 @@ use std::ops::{BitAnd, BitOr, BitXor};
|
||||
use crate::style::Attribute;
|
||||
|
||||
/// a bitset for all possible attributes
|
||||
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Default, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct Attributes(u32);
|
||||
|
||||
impl From<Attribute> for Attributes {
|
||||
|
@ -5,7 +5,7 @@ use std::fmt::Display;
|
||||
use crate::style::{Attributes, Color, StyledContent};
|
||||
|
||||
/// The style that can be put on content.
|
||||
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq)]
|
||||
#[derive(Debug, Copy, Clone, Default, PartialEq, Eq, Hash)]
|
||||
pub struct ContentStyle {
|
||||
/// The foreground color.
|
||||
pub foreground_color: Option<Color>,
|
||||
|
@ -26,7 +26,7 @@ use crate::style::{Color, Colored};
|
||||
/// ```
|
||||
///
|
||||
/// See [Color](enum.Color.html).
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub struct Colors {
|
||||
pub foreground: Option<Color>,
|
||||
pub background: Option<Color>,
|
||||
|
Loading…
x
Reference in New Issue
Block a user