pub struct LocalSessionManager {
pub sessions: RwLock<HashMap<Arc<str>, LocalSessionHandle>>,
pub session_config: SessionConfig,
}Fields§
§sessions: RwLock<HashMap<Arc<str>, LocalSessionHandle>>§session_config: SessionConfigTrait Implementations§
Source§impl Debug for LocalSessionManager
impl Debug for LocalSessionManager
Source§impl Default for LocalSessionManager
impl Default for LocalSessionManager
Source§fn default() -> LocalSessionManager
fn default() -> LocalSessionManager
Returns the “default value” for a type. Read more
Source§impl SessionManager for LocalSessionManager
impl SessionManager for LocalSessionManager
type Error = LocalSessionManagerError
type Transport = WorkerTransport<LocalSessionWorker>
Source§async fn create_session(
&self,
) -> Result<(Arc<str>, <LocalSessionManager as SessionManager>::Transport), <LocalSessionManager as SessionManager>::Error>
async fn create_session( &self, ) -> Result<(Arc<str>, <LocalSessionManager as SessionManager>::Transport), <LocalSessionManager as SessionManager>::Error>
Create a new session with the given id and configuration.
async fn initialize_session( &self, id: &Arc<str>, message: JsonRpcMessage<ClientRequest, ClientResult, ClientNotification>, ) -> Result<JsonRpcMessage<ServerRequest, ServerResult, ServerNotification>, <LocalSessionManager as SessionManager>::Error>
async fn close_session( &self, id: &Arc<str>, ) -> Result<(), <LocalSessionManager as SessionManager>::Error>
async fn has_session( &self, id: &Arc<str>, ) -> Result<bool, <LocalSessionManager as SessionManager>::Error>
async fn create_stream( &self, id: &Arc<str>, message: JsonRpcMessage<ClientRequest, ClientResult, ClientNotification>, ) -> Result<impl Stream<Item = ServerSseMessage> + Send + 'static, <LocalSessionManager as SessionManager>::Error>
async fn create_standalone_stream( &self, id: &Arc<str>, ) -> Result<impl Stream<Item = ServerSseMessage> + Send + 'static, <LocalSessionManager as SessionManager>::Error>
async fn resume( &self, id: &Arc<str>, last_event_id: String, ) -> Result<impl Stream<Item = ServerSseMessage> + Send + 'static, <LocalSessionManager as SessionManager>::Error>
async fn accept_message( &self, id: &Arc<str>, message: JsonRpcMessage<ClientRequest, ClientResult, ClientNotification>, ) -> Result<(), <LocalSessionManager as SessionManager>::Error>
Auto Trait Implementations§
impl !Freeze for LocalSessionManager
impl !RefUnwindSafe for LocalSessionManager
impl Send for LocalSessionManager
impl Sync for LocalSessionManager
impl Unpin for LocalSessionManager
impl UnwindSafe for LocalSessionManager
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