pub struct SyntaxSpans { /* private fields */ }Expand description
The colour runs of one editor’s syntax, encoded and ready to travel.
Implementations§
Source§impl SyntaxSpans
impl SyntaxSpans
pub fn new(spans: impl IntoIterator<Item = SyntaxSpan>) -> Self
pub fn from_bytes(bytes: impl Into<Rc<[u8]>>) -> Self
pub fn as_bytes(&self) -> &[u8] ⓘ
pub fn is_empty(&self) -> bool
Sourcepub fn spans(&self) -> Vec<SyntaxSpan>
pub fn spans(&self) -> Vec<SyntaxSpan>
The runs this list holds, read back. A run whose paint this side cannot read is skipped.
Trait Implementations§
Source§impl Clone for SyntaxSpans
impl Clone for SyntaxSpans
Source§impl Debug for SyntaxSpans
impl Debug for SyntaxSpans
Source§impl Default for SyntaxSpans
impl Default for SyntaxSpans
Source§impl PartialEq for SyntaxSpans
impl PartialEq for SyntaxSpans
impl StructuralPartialEq for SyntaxSpans
Auto Trait Implementations§
impl !Send for SyntaxSpans
impl !Sync for SyntaxSpans
impl Freeze for SyntaxSpans
impl RefUnwindSafe for SyntaxSpans
impl Unpin for SyntaxSpans
impl UnsafeUnpin for SyntaxSpans
impl UnwindSafe for SyntaxSpans
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