mirror of
https://github.com/crossterm-rs/crossterm.git
synced 2025-10-02 07:21:31 +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;
|
use crate::style::Attribute;
|
||||||
|
|
||||||
/// a bitset for all possible attributes
|
/// 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);
|
pub struct Attributes(u32);
|
||||||
|
|
||||||
impl From<Attribute> for Attributes {
|
impl From<Attribute> for Attributes {
|
||||||
|
@ -5,7 +5,7 @@ use std::fmt::Display;
|
|||||||
use crate::style::{Attributes, Color, StyledContent};
|
use crate::style::{Attributes, Color, StyledContent};
|
||||||
|
|
||||||
/// The style that can be put on content.
|
/// 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 {
|
pub struct ContentStyle {
|
||||||
/// The foreground color.
|
/// The foreground color.
|
||||||
pub foreground_color: Option<Color>,
|
pub foreground_color: Option<Color>,
|
||||||
|
@ -26,7 +26,7 @@ use crate::style::{Color, Colored};
|
|||||||
/// ```
|
/// ```
|
||||||
///
|
///
|
||||||
/// See [Color](enum.Color.html).
|
/// See [Color](enum.Color.html).
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub struct Colors {
|
pub struct Colors {
|
||||||
pub foreground: Option<Color>,
|
pub foreground: Option<Color>,
|
||||||
pub background: Option<Color>,
|
pub background: Option<Color>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user