pub struct CellAttrs(/* private fields */);Expand description
Packed cell attributes:
- bits 31..24:
StyleFlags(8 bits) - bits 23..0:
link_id(24 bits)
Implementations§
Source§impl CellAttrs
impl CellAttrs
Sourcepub const LINK_ID_NONE: u32 = 0
pub const LINK_ID_NONE: u32 = 0
Sentinel value for “no hyperlink”.
Sourcepub const LINK_ID_MAX: u32 = 0x00FF_FFFE
pub const LINK_ID_MAX: u32 = 0x00FF_FFFE
Maximum link ID (24-bit range).
Sourcepub fn new(flags: StyleFlags, link_id: u32) -> Self
pub fn new(flags: StyleFlags, link_id: u32) -> Self
Create attributes from flags and a hyperlink ID.
Sourcepub fn flags(self) -> StyleFlags
pub fn flags(self) -> StyleFlags
Extract the style flags.
Sourcepub fn with_flags(self, flags: StyleFlags) -> Self
pub fn with_flags(self, flags: StyleFlags) -> Self
Return a copy with different style flags.
Sourcepub fn has_flag(self, flag: StyleFlags) -> bool
pub fn has_flag(self, flag: StyleFlags) -> bool
Check whether a specific flag is set.
Trait Implementations§
impl Copy for CellAttrs
impl Eq for CellAttrs
impl StructuralPartialEq for CellAttrs
Auto Trait Implementations§
impl Freeze for CellAttrs
impl RefUnwindSafe for CellAttrs
impl Send for CellAttrs
impl Sync for CellAttrs
impl Unpin for CellAttrs
impl UnsafeUnpin for CellAttrs
impl UnwindSafe for CellAttrs
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