pub struct WorkerSession { /* private fields */ }Expand description
One worker’s acknowledged session lease.
Clones share lifecycle state. active() is a local lease hint, not authority
for an external side effect. Server fences activity completion. Replacement
holders must rebuild process-local resources rather than restore this handle.
Implementations§
Source§impl WorkerSession
impl WorkerSession
pub fn options(&self) -> &WorkerSessionOptions
pub fn active(&self) -> bool
Sourcepub fn snapshot(&self) -> Result<Option<Value>>
pub fn snapshot(&self) -> Result<Option<Value>>
Last validated session snapshot, including holder and original TTL.
pub async fn create(&self) -> Result<Value>
Trait Implementations§
Source§impl Clone for WorkerSession
impl Clone for WorkerSession
Source§fn clone(&self) -> WorkerSession
fn clone(&self) -> WorkerSession
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for WorkerSession
impl !RefUnwindSafe for WorkerSession
impl Send for WorkerSession
impl Sync for WorkerSession
impl Unpin for WorkerSession
impl !UnwindSafe for WorkerSession
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