pub struct Editor { /* private fields */ }
Expand description
Editor 结构体代表编辑器的核心功能实现 负责管理文档状态、事件处理、插件系统和存储等核心功能
Implementations§
Trait Implementations§
Source§impl EditorCore for Editor
impl EditorCore for Editor
type Error = Box<dyn Error>
Source§fn get_options(&self) -> &EditorOptions
fn get_options(&self) -> &EditorOptions
获取编辑器配置选项
Source§fn get_schema(&self) -> Arc<Schema>
fn get_schema(&self) -> Arc<Schema>
获取文档模式定义
Source§fn get_event_bus(&self) -> &EventBus
fn get_event_bus(&self) -> &EventBus
获取事件总线实例
Source§fn get_tr(&self) -> Transaction
fn get_tr(&self) -> Transaction
创建新的事务实例
Source§fn command<'life0, 'async_trait>(
&'life0 mut self,
command: Arc<dyn Command>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn command<'life0, 'async_trait>(
&'life0 mut self,
command: Arc<dyn Command>,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
执行自定义命令
Source§fn dispatch<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dispatch<'life0, 'async_trait>(
&'life0 mut self,
transaction: Transaction,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
处理事务并更新状态
Source§fn register_plugin<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_plugin<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
注册新插件
Auto Trait Implementations§
impl Freeze for Editor
impl !RefUnwindSafe for Editor
impl Send for Editor
impl Sync for Editor
impl !Unpin 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