Struct cosmic_text::AttrsList
source · [−]pub struct AttrsList<'a> { /* private fields */ }Expand description
List of text attributes to apply to a line
Implementations
sourceimpl<'a> AttrsList<'a>
impl<'a> AttrsList<'a>
sourcepub fn new(defaults: Attrs<'a>) -> Self
pub fn new(defaults: Attrs<'a>) -> Self
Create a new attributes list with a set of default Attrs
sourcepub fn clear_spans(&mut self)
pub fn clear_spans(&mut self)
Clear the current attribute spans
sourcepub fn add_span(&mut self, range: Range<usize>, attrs: Attrs<'a>)
pub fn add_span(&mut self, range: Range<usize>, attrs: Attrs<'a>)
Add an attribute span, removes any previous matching parts of spans
Trait Implementations
sourceimpl<'a> PartialEq<AttrsList<'a>> for AttrsList<'a>
impl<'a> PartialEq<AttrsList<'a>> for AttrsList<'a>
impl<'a> Eq for AttrsList<'a>
impl<'a> StructuralEq for AttrsList<'a>
impl<'a> StructuralPartialEq for AttrsList<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for AttrsList<'a>
impl<'a> Send for AttrsList<'a>
impl<'a> Sync for AttrsList<'a>
impl<'a> Unpin for AttrsList<'a>
impl<'a> UnwindSafe for AttrsList<'a>
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