pub struct AsyncDocument { /* private fields */ }Available on crate features
concurrency and async only.Expand description
Async-friendly wrapper for non-blocking operations
Implementations§
Source§impl AsyncDocument
impl AsyncDocument
Sourcepub fn new(document: EditorDocument) -> Self
pub fn new(document: EditorDocument) -> Self
Create a new async document wrapper
Sourcepub async fn text_async(&self) -> Result<String>
pub async fn text_async(&self) -> Result<String>
Async-friendly text retrieval
Sourcepub async fn execute_command_async<C: EditorCommand + Send + 'static>(
&self,
command: C,
) -> Result<CommandResult>
pub async fn execute_command_async<C: EditorCommand + Send + 'static>( &self, command: C, ) -> Result<CommandResult>
Async-friendly command execution
Auto Trait Implementations§
impl Freeze for AsyncDocument
impl RefUnwindSafe for AsyncDocument
impl !Send for AsyncDocument
impl !Sync for AsyncDocument
impl Unpin for AsyncDocument
impl UnwindSafe for AsyncDocument
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