Document

Trait Document 

Source
pub trait Document:
    Deref<Target = BaseDocument>
    + DerefMut
    + 'static {
    // Required method
    fn as_any_mut(&mut self) -> &mut dyn Any;

    // Provided methods
    fn handle_ui_event(&mut self, event: UiEvent) { ... }
    fn poll(&mut self, task_context: Option<TaskContext<'_>>) -> bool { ... }
    fn id(&self) -> usize { ... }
}
Expand description

Abstraction over wrappers around BaseDocument to allow for them all to be driven by blitz-shell

Required Methods§

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Provided Methods§

Source

fn handle_ui_event(&mut self, event: UiEvent)

Update the Document in response to a UiEvent (click, keypress, etc)

Source

fn poll(&mut self, task_context: Option<TaskContext<'_>>) -> bool

Poll any pending async operations, and flush changes to the underlying BaseDocument

Source

fn id(&self) -> usize

Get the Document’s id

Implementors§