pub struct PluginUpdate {
pub view_id: ViewId,
pub delta: Option<RopeDelta>,
pub new_len: usize,
pub new_line_count: usize,
pub rev: u64,
pub undo_group: Option<usize>,
pub edit_type: String,
pub author: String,
}
Expand description
A simple update, sent to a plugin.
Fields§
§view_id: ViewId
§delta: Option<RopeDelta>
The delta representing changes to the document.
Note: Is Some
in the general case; only if the delta involves
inserting more than some maximum number of bytes, will this be None
,
indicating the plugin should flush cache and fetch manually.
new_len: usize
The size of the document after applying this delta.
new_line_count: usize
The total number of lines in the document after applying this delta.
rev: u64
§undo_group: Option<usize>
The undo_group associated with this update. The plugin may pass this value back to core when making an edit, to associate the plugin’s edit with this undo group. Core uses undo_group
edit_type: String
Implementations§
Trait Implementations§
Source§impl Clone for PluginUpdate
impl Clone for PluginUpdate
Source§fn clone(&self) -> PluginUpdate
fn clone(&self) -> PluginUpdate
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PluginUpdate
impl Debug for PluginUpdate
Source§impl<'de> Deserialize<'de> for PluginUpdate
impl<'de> Deserialize<'de> for PluginUpdate
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PluginUpdate
impl RefUnwindSafe for PluginUpdate
impl Send for PluginUpdate
impl Sync for PluginUpdate
impl Unpin for PluginUpdate
impl UnwindSafe for PluginUpdate
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