pub trait CustomDisplay<X: GXExt>: Any {
// Required methods
fn clear<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn process_update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
env: &'life1 Env,
id: ExprId,
v: Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait implemented by custom Graphix displays, e.g. TUIs, GUIs, etc.
Required Methods§
Sourcefn clear<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clear the custom display, freeing any used resources.
This is called when the shell user has indicated that they want to return to the normal display mode or when the stop channel has been triggered by this custom display.
If the custom display has started a closure on the main thread, it must now stop it.
Sourcefn process_update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
env: &'life1 Env,
id: ExprId,
v: Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn process_update<'life0, 'life1, 'async_trait>(
&'life0 mut self,
env: &'life1 Env,
id: ExprId,
v: Value,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Process an update from the Graphix rt in the context of the custom display.
This will be called by every update, even if it isn’t related to the custom display. If the future returned by this method is never determined then the shell will hang.