Skip to main content

ViewResolver

Trait ViewResolver 

Source
pub trait ViewResolver: Send + Sync {
    // Required method
    fn view_for(&self, conv_id: &str) -> Option<Arc<SessionView>>;
}
Expand description

Resolve the per-conversation SessionView the loop must commit onto.

Returns None when the conversation has been reaped (its view dropped); the loop treats that as a logged no-op rather than committing onto a stale view.

Required Methods§

Source

fn view_for(&self, conv_id: &str) -> Option<Arc<SessionView>>

The live view for conv_id, or None if the conversation is gone.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§