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);
// Provided method
fn on_object_enter(&self, token: u32, side: Side) -> bool { ... }
}Expand description
Callbacks implemented by the host.
Required Methods§
Sourcefn request_close(&self)
fn request_close(&self)
Request that math mode ends.
Provided Methods§
Sourcefn on_object_enter(&self, token: u32, side: Side) -> bool
fn on_object_enter(&self, token: u32, side: Side) -> bool
Handle horizontal caret motion into a host object, true consumes the motion.
side is the direction of approach, Before when moving right and After when moving
left. The default leaves the motion unconsumed, so the caret skips over the object.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".