pub struct Editor { /* private fields */ }Implementations§
Source§impl Editor
impl Editor
Sourcepub fn with_text<T: Into<Rope>>(text: T) -> Editor
pub fn with_text<T: Into<Rope>>(text: T) -> Editor
Creates a new Editor, loading text into a new buffer.
Sourcepub fn reload(&mut self, text: Rope)
pub fn reload(&mut self, text: Rope)
Sets this Editor’s contents to text, preserving undo state and cursor
position when possible.
pub fn increment_revs_in_flight(&mut self)
pub fn dec_revs_in_flight(&mut self)
Sourcepub fn apply_plugin_edit(&mut self, edit: PluginEdit)
pub fn apply_plugin_edit(&mut self, edit: PluginEdit)
generates a delta from a plugin’s response and applies it to the buffer.
pub fn merge_new_state(&mut self, new_engine: Engine)
Sourcepub fn set_session_id(&mut self, session: (u64, u32))
pub fn set_session_id(&mut self, session: (u64, u32))
See Engine::set_session_id. Only useful for Fuchsia sync.
pub fn sync_state_changed(&mut self)
pub fn theme_changed(&mut self, style_map: &ThemeStyleMap)
pub fn plugin_n_lines(&self) -> usize
pub fn update_spans( &mut self, view: &mut View, plugin: PluginId, start: usize, len: usize, spans: Vec<ScopeSpan>, rev: RevToken, )
pub fn update_annotations( &mut self, view: &mut View, plugin: PluginId, start: usize, len: usize, annotation_spans: Vec<DataSpan>, annotation_type: AnnotationType, rev: RevToken, )
pub fn plugin_get_data( &self, start: usize, unit: TextUnit, max_size: usize, rev: RevToken, ) -> Option<GetDataResponse>
Auto Trait Implementations§
impl Freeze for Editor
impl RefUnwindSafe for Editor
impl Send for Editor
impl Sync for Editor
impl Unpin for Editor
impl UnsafeUnpin for Editor
impl UnwindSafe for Editor
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