pub struct Decorations { /* private fields */ }Implementations§
Source§impl Decorations
impl Decorations
pub fn len(&self) -> usize
Sourcepub fn generation(&self) -> u64
pub fn generation(&self) -> u64
Changes whenever any decoration is added, removed or moved.
pub fn is_empty(&self) -> bool
Sourcepub fn set(
&mut self,
owner: u32,
kind: u32,
stickiness: Stickiness,
ranges: impl IntoIterator<Item = Range<usize>>,
) -> Vec<DecorationId>
pub fn set( &mut self, owner: u32, kind: u32, stickiness: Stickiness, ranges: impl IntoIterator<Item = Range<usize>>, ) -> Vec<DecorationId>
Replaces all decorations of owner with ranges, returning their ids.
Sourcepub fn set_each(
&mut self,
owner: u32,
stickiness: Stickiness,
items: impl IntoIterator<Item = (Range<usize>, u32)>,
) -> Vec<DecorationId>
pub fn set_each( &mut self, owner: u32, stickiness: Stickiness, items: impl IntoIterator<Item = (Range<usize>, u32)>, ) -> Vec<DecorationId>
Replaces all decorations of owner with items, each a range with its own kind.
pub fn clear(&mut self, owner: u32)
pub fn get(&self, id: DecorationId) -> Option<&Decoration>
Sourcepub fn in_range(&self, range: Range<usize>) -> Vec<&Decoration>
pub fn in_range(&self, range: Range<usize>) -> Vec<&Decoration>
Decorations overlapping range (a collapsed decoration at range.start counts), in
order of start.
Sourcepub fn iter(&self) -> impl Iterator<Item = &Decoration>
pub fn iter(&self) -> impl Iterator<Item = &Decoration>
Every decoration, in no particular order.
Sourcepub fn of_owner(&self, owner: u32) -> Vec<&Decoration>
pub fn of_owner(&self, owner: u32) -> Vec<&Decoration>
All decorations of owner, in order of start.
Trait Implementations§
Source§impl Clone for Decorations
impl Clone for Decorations
Source§impl Debug for Decorations
impl Debug for Decorations
Auto Trait Implementations§
impl Forget for Decorations
impl Freeze for Decorations
impl Move for Decorations
impl RefUnwindSafe for Decorations
impl Send for Decorations
impl Sync for Decorations
impl Unpin for Decorations
impl UnsafeUnpin for Decorations
impl UnwindSafe for Decorations
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