Skip to main content

Session

Trait Session 

Source
pub trait Session: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn app_name(&self) -> &str;
    fn user_id(&self) -> &str;
    fn state(&self) -> &dyn State;
    fn events(&self) -> Vec<Event>;
    fn last_update_time(&self) -> DateTime<Utc>;
    fn as_any(&self) -> &dyn Any;
}
Expand description

A series of interactions between a user and agents.

Required Methods§

Source

fn id(&self) -> &str

The unique identifier of the session.

Source

fn app_name(&self) -> &str

The name of the app.

Source

fn user_id(&self) -> &str

The id of the user.

Source

fn state(&self) -> &dyn State

The state of the session.

Source

fn events(&self) -> Vec<Event>

The events of the session, in order.

Source

fn last_update_time(&self) -> DateTime<Utc>

The time of the last update.

Source

fn as_any(&self) -> &dyn Any

Downcasting support for implementations.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§