pub struct JsSessionRepository(ThreadBoundRunner<RawJsSessionRepository>);Expand description
Thread safe JavaScript implementation of the SessionRepository trait for IPC sessions.
Tuple Fields§
§0: ThreadBoundRunner<RawJsSessionRepository>Implementations§
Source§impl JsSessionRepository
impl JsSessionRepository
Sourcepub fn new(repository: RawJsSessionRepository) -> Self
pub fn new(repository: RawJsSessionRepository) -> Self
Creates a new JsSessionRepository instance wrapping the raw JavaScript repository.
Trait Implementations§
Source§impl Clone for JsSessionRepository
impl Clone for JsSessionRepository
Source§impl<Session> SessionRepository<Session> for JsSessionRepository
impl<Session> SessionRepository<Session> for JsSessionRepository
type GetError = String
type SaveError = String
type RemoveError = String
async fn get( &self, endpoint: Endpoint, ) -> Result<Option<Session>, Self::GetError>
async fn save( &self, endpoint: Endpoint, session: Session, ) -> Result<(), Self::SaveError>
async fn remove(&self, endpoint: Endpoint) -> Result<(), Self::RemoveError>
Auto Trait Implementations§
impl Freeze for JsSessionRepository
impl RefUnwindSafe for JsSessionRepository
impl Send for JsSessionRepository
impl Sync for JsSessionRepository
impl Unpin for JsSessionRepository
impl UnsafeUnpin for JsSessionRepository
impl UnwindSafe for JsSessionRepository
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