Skip to main content

Host

Trait Host 

Source
pub trait Host {
    // Required methods
    fn typeset(&self, latex: &str) -> Fragment;
    fn on_change(&self, doc: &Document);
    fn on_exit(&self, dir: ExitDir);
    fn request_close(&self);
    fn on_render(&self);
}
Expand description

Callbacks implemented by the host.

Required Methods§

Source

fn typeset(&self, latex: &str) -> Fragment

Typeset a LaTeX fragment to the mathtex IR.

Source

fn on_change(&self, doc: &Document)

Handle changed content.

Source

fn on_exit(&self, dir: ExitDir)

Handle the caret leaving the math region at a boundary.

Source

fn request_close(&self)

Request that math mode ends.

Source

fn on_render(&self)

Request a repaint via Editor::render.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§