pub struct InlineMarks(/* private fields */);Expand description
The inline marks in force at a point in the document — what a toolbar
lights up. A Copy bitset rather than a HashSet, because
Doc::active_inline_marks is called on every frame that draws a toolbar
and a set that allocates to answer “is Bold on?” is a set that shouldn’t.
Implementations§
Source§impl InlineMarks
impl InlineMarks
pub const fn empty() -> Self
Sourcepub fn contains(self, kind: InlineKind) -> bool
pub fn contains(self, kind: InlineKind) -> bool
Whether kind is in force — the toolbar’s “is Bold active?”.
pub fn is_empty(self) -> bool
Sourcepub fn iter(self) -> impl Iterator<Item = InlineKind>
pub fn iter(self) -> impl Iterator<Item = InlineKind>
The marks in force, for a frontend that renders whatever is on rather than asking after a fixed list.
Trait Implementations§
Source§impl Clone for InlineMarks
impl Clone for InlineMarks
Source§fn clone(&self) -> InlineMarks
fn clone(&self) -> InlineMarks
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 InlineMarks
Source§impl Debug for InlineMarks
impl Debug for InlineMarks
Source§impl Default for InlineMarks
impl Default for InlineMarks
Source§fn default() -> InlineMarks
fn default() -> InlineMarks
Returns the “default value” for a type. Read more
impl Eq for InlineMarks
Source§impl FromIterator<InlineKind> for InlineMarks
impl FromIterator<InlineKind> for InlineMarks
Source§fn from_iter<I: IntoIterator<Item = InlineKind>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = InlineKind>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl PartialEq for InlineMarks
impl PartialEq for InlineMarks
impl StructuralPartialEq for InlineMarks
Auto Trait Implementations§
impl Freeze for InlineMarks
impl RefUnwindSafe for InlineMarks
impl Send for InlineMarks
impl Sync for InlineMarks
impl Unpin for InlineMarks
impl UnsafeUnpin for InlineMarks
impl UnwindSafe for InlineMarks
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