pub struct Decorations { /* private fields */ }Expand description
The decorations over one editor, encoded and ready to travel.
Records first and the text they show after them, so the records stay fixed-length. Shared rather than copied, so the same list given again compares equal and costs no record at all.
Implementations§
Source§impl Decorations
impl Decorations
pub fn new(decorations: impl IntoIterator<Item = Decoration>) -> Self
Sourcepub fn from_bytes(bytes: impl Into<Rc<[u8]>>) -> Self
pub fn from_bytes(bytes: impl Into<Rc<[u8]>>) -> Self
Adopts an already encoded list, which is what the protocol vectors carry.
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn is_empty(&self) -> bool
Sourcepub fn decorations(&self) -> Vec<Decoration>
pub fn decorations(&self) -> Vec<Decoration>
The decorations this list holds, read back.
The records end where the text region begins, which is the first offset any record names for its text, or the end of the blob where none names one. A record whose kind, severity or colour is not one this side knows is skipped, which is what the Renderer does with it too.
Trait Implementations§
Source§impl Clone for Decorations
impl Clone for Decorations
Source§impl Debug for Decorations
impl Debug for Decorations
Source§impl Default for Decorations
impl Default for Decorations
Source§impl PartialEq for Decorations
impl PartialEq for Decorations
impl StructuralPartialEq for Decorations
Auto Trait Implementations§
impl !Send for Decorations
impl !Sync for Decorations
impl Freeze for Decorations
impl RefUnwindSafe 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