pub struct AsyncEditor { /* private fields */ }
Expand description
Editor 结构体代表编辑器的核心功能实现 负责管理文档状态、事件处理、插件系统和存储等核心功能
Implementations§
Source§impl AsyncEditor
impl AsyncEditor
Sourcepub async fn create(options: EditorOptions) -> Result<Self, Box<dyn Error>>
pub async fn create(options: EditorOptions) -> Result<Self, Box<dyn Error>>
创建新的编辑器实例 options: 编辑器配置选项
Sourcepub fn set_performance_config(&mut self, config: PerformanceConfig)
pub fn set_performance_config(&mut self, config: PerformanceConfig)
设置性能监控配置
Sourcepub async fn dispatch_flow(
&mut self,
transaction: Transaction,
) -> EditorResult<()>
pub async fn dispatch_flow( &mut self, transaction: Transaction, ) -> EditorResult<()>
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>>, transactions: &mut Vec<Transaction>, ) -> EditorResult<()>
Methods from Deref<Target = Editor>§
pub async fn emit_event(&mut self, event: Event) -> EditorResult<()>
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>>, transactions: &mut Vec<Transaction>, ) -> 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 update_state(&mut self, state: Arc<State>) -> 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
Source§impl DerefMut for AsyncEditor
impl DerefMut for AsyncEditor
impl Send for AsyncEditor
impl Sync for AsyncEditor
Auto Trait Implementations§
impl Freeze for AsyncEditor
impl !RefUnwindSafe 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more