pub struct AsyncEditor { /* private fields */ }
Expand description
Editor 结构体代表编辑器的核心功能实现 负责管理文档状态、事件处理、插件系统和存储等核心功能
Implementations§
Source§impl AsyncEditor
impl AsyncEditor
Methods from Deref<Target = Editor>§
Sourcepub fn add_middleware<M>(&mut self, middleware: M)where
M: Middleware + 'static,
pub fn add_middleware<M>(&mut self, middleware: M)where
M: Middleware + 'static,
Add a middleware to the stack
pub async fn run_before_middleware( &mut self, transaction: &mut Transaction, ) -> EditorResult<()>
pub async fn run_after_middleware( &mut self, state: &mut Option<Arc<State>>, ) -> EditorResult<()>
pub async fn command(&mut self, command: Arc<dyn Command>) -> EditorResult<()>
Sourcepub async fn dispatch(&mut self, transaction: Transaction) -> EditorResult<()>
pub async fn dispatch(&mut self, transaction: Transaction) -> EditorResult<()>
pub async fn register_plugin(&mut self) -> EditorResult<()>
pub async fn unregister_plugin( &mut self, plugin_key: String, ) -> EditorResult<()>
pub fn get_options(&self) -> &EditorOptions
pub fn get_state(&self) -> &Arc<State>
pub fn get_schema(&self) -> Arc<Schema>
pub fn get_event_bus(&self) -> &EventBus
pub fn get_tr(&self) -> Transaction
pub fn undo(&mut self)
pub fn redo(&mut self)
pub fn jump(&mut self, n: isize)
Trait Implementations§
Source§impl Deref for AsyncEditor
impl Deref for AsyncEditor
Auto Trait Implementations§
impl Freeze for AsyncEditor
impl !RefUnwindSafe for AsyncEditor
impl Send for AsyncEditor
impl Sync for AsyncEditor
impl !Unpin for AsyncEditor
impl !UnwindSafe for AsyncEditor
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