#[repr(C)]pub struct SgrAttribute {
pub tag: Type,
pub value: SgrAttributeValue,
}Expand description
SGR attribute (tagged union).
A complete SGR attribute with both its type tag and associated value. Always check the tag field to determine which value union member is valid.
Attributes without associated data (e.g., GHOSTTY_SGR_ATTR_BOLD) can be identified by tag alone; the value union is not used for these and the memory in the value field is undefined.
Fields§
§tag: Type§value: SgrAttributeValueTrait Implementations§
Source§impl Clone for SgrAttribute
impl Clone for SgrAttribute
Source§fn clone(&self) -> SgrAttribute
fn clone(&self) -> SgrAttribute
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SgrAttribute
Auto Trait Implementations§
impl !Send for SgrAttribute
impl !Sync for SgrAttribute
impl Freeze for SgrAttribute
impl RefUnwindSafe for SgrAttribute
impl Unpin for SgrAttribute
impl UnsafeUnpin for SgrAttribute
impl UnwindSafe for SgrAttribute
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