pub struct SessionValues { /* private fields */ }Expand description
An open session shared by the stores over its values; clones share it.
Implementations§
Source§impl SessionValues
impl SessionValues
pub fn new(session: Session) -> Self
Values of a session another owner holds open (the session actor’s); clones share it.
Sourcepub fn hand_over(&self)
pub fn hand_over(&self)
The worker hands the session to a successor: from now on every write through these values is dropped.
pub fn handed_over(&self) -> bool
pub fn session(&self) -> &Arc<Mutex<Session>> ⓘ
pub fn get(&self, namespace: &str, key: &str) -> Option<Value>
pub fn set( &self, namespace: &str, key: &str, value: &Value, ) -> Result<(), String>
pub fn document(&self, namespace: &str, key: &str) -> SessionDocument
Sourcepub fn keyed(&self, namespace: &str) -> SessionKeyed
pub fn keyed(&self, namespace: &str) -> SessionKeyed
Keyed documents under namespace (the local services’ ultron.local).
Trait Implementations§
Auto Trait Implementations§
impl Forget for SessionValues
impl Freeze for SessionValues
impl Move for SessionValues
impl RefUnwindSafe for SessionValues
impl Send for SessionValues
impl Sync for SessionValues
impl Unpin for SessionValues
impl UnsafeUnpin for SessionValues
impl UnwindSafe for SessionValues
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