pub struct Layers { /* private fields */ }
Expand description
A collection of layers containing scope information.
Implementations§
Source§impl Layers
impl Layers
pub fn get_merged(&self) -> &Spans<Style>
Sourcepub fn add_scopes(
&mut self,
layer: PluginPid,
scopes: Vec<Vec<String>>,
style_map: &ThemeStyleMap,
)
pub fn add_scopes( &mut self, layer: PluginPid, scopes: Vec<Vec<String>>, style_map: &ThemeStyleMap, )
Adds the provided scopes to the layer’s lookup table.
Sourcepub fn update_all(&mut self, delta: &RopeDelta)
pub fn update_all(&mut self, delta: &RopeDelta)
Applies the delta to all layers, inserting empty intervals for any regions inserted in the delta.
This is useful for clearing spans, and for updating spans as edits occur.
Sourcepub fn update_layer(
&mut self,
layer: PluginPid,
iv: Interval,
spans: Spans<u32>,
)
pub fn update_layer( &mut self, layer: PluginPid, iv: Interval, spans: Spans<u32>, )
Updates the scope spans for a given layer.
Sourcepub fn remove_layer(&mut self, layer: PluginPid) -> Option<ScopeLayer>
pub fn remove_layer(&mut self, layer: PluginPid) -> Option<ScopeLayer>
Removes a given layer. This will remove all styles derived from that layer’s scopes.
pub fn theme_changed(&mut self, style_map: &ThemeStyleMap)
Sourcepub fn debug_print_spans(&self, iv: Interval)
pub fn debug_print_spans(&self, iv: Interval)
Prints scopes and style information for the given Interval
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Layers
impl RefUnwindSafe for Layers
impl Send for Layers
impl Sync for Layers
impl Unpin for Layers
impl UnwindSafe for Layers
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