Struct stylish_core::StyleDiff
source · [−]#[non_exhaustive]pub struct StyleDiff {
pub foreground: Option<Color>,
pub background: Option<Color>,
pub intensity: Option<Intensity>,
}
Expand description
A diff between two styles.
Most useful for some implementors of stylish::Write
to detect changes
between two parts, or for applying multiple changes to a style at once.
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.foreground: Option<Color>
The change in the text foreground color
background: Option<Color>
The change in the text background color
intensity: Option<Intensity>
The change in the text intensity
Trait Implementations
sourceimpl PartialEq<StyleDiff> for StyleDiff
impl PartialEq<StyleDiff> for StyleDiff
impl Copy for StyleDiff
impl Eq for StyleDiff
impl StructuralEq for StyleDiff
impl StructuralPartialEq for StyleDiff
Auto Trait Implementations
impl RefUnwindSafe for StyleDiff
impl Send for StyleDiff
impl Sync for StyleDiff
impl Unpin for StyleDiff
impl UnwindSafe for StyleDiff
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more