pub struct AppState {
pub agent: Arc<Agent>,
/* private fields */
}Fields§
§agent: Arc<Agent>Implementations§
Source§impl AppState
impl AppState
pub fn new(agent: Agent) -> Self
pub async fn get_or_create_session(&self, session_id: Option<Id>) -> Session
pub async fn get_session(&self, session_id: &Id) -> Option<Session>
pub async fn remove_session(&self, session_id: &Id) -> Option<Session>
pub async fn session_count(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppState
impl !RefUnwindSafe for AppState
impl Send for AppState
impl Sync for AppState
impl Unpin for AppState
impl !UnwindSafe for AppState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more