pub struct EditorTextMailbox { /* private fields */ }Expand description
Shared, cloneable handle to the pending-edit queue.
Implementations§
Source§impl EditorTextMailbox
impl EditorTextMailbox
pub fn new() -> Self
Sourcepub fn push(&self, edit: EditorTextEdit)
pub fn push(&self, edit: EditorTextEdit)
Queue an edit. Never blocks and never fails (a poisoned lock, which would mean a panicking reader, just drops the write).
Sourcepub fn handle(&self, args: Value) -> Result<Value, String>
pub fn handle(&self, args: Value) -> Result<Value, String>
Handle the SetEditorText runtime action payload.
Sourcepub fn take_pending(&self) -> Option<EditorTextEdit>
pub fn take_pending(&self) -> Option<EditorTextEdit>
Remove and return the next queued edit, or None when idle.
Trait Implementations§
Source§impl Clone for EditorTextMailbox
impl Clone for EditorTextMailbox
Auto Trait Implementations§
impl Freeze for EditorTextMailbox
impl RefUnwindSafe for EditorTextMailbox
impl Send for EditorTextMailbox
impl Sync for EditorTextMailbox
impl Unpin for EditorTextMailbox
impl UnsafeUnpin for EditorTextMailbox
impl UnwindSafe for EditorTextMailbox
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