pub struct SessionAuthority { /* private fields */ }Expand description
Unique authority for a mutable session and its unresolved submission.
Beginning work requires exclusive access to this non-cloneable owner. The active ticket is atomic so a completion may resolve on another thread; this does not make a backend’s native session or resources thread-safe. Each authority allocates once, and each lease shares that allocation.
Implementations§
Source§impl SessionAuthority
impl SessionAuthority
Sourcepub fn require_idle(&self) -> Result<(), SessionAuthorityError>
pub fn require_idle(&self) -> Result<(), SessionAuthorityError>
Rejects mutation while a submission completion owns this session.
Sourcepub fn begin_submission(
&mut self,
) -> Result<SubmissionLease, SessionAuthorityError>
pub fn begin_submission( &mut self, ) -> Result<SubmissionLease, SessionAuthorityError>
Begins one submission before native allocation or mutable execution.
An aborted submission releases automatically when its lease is dropped. Successful submission moves the lease into its native completion; no second independently releasable copy can be created.
Trait Implementations§
Source§impl Debug for SessionAuthority
impl Debug for SessionAuthority
Auto Trait Implementations§
impl Freeze for SessionAuthority
impl RefUnwindSafe for SessionAuthority
impl Send for SessionAuthority
impl Sync for SessionAuthority
impl Unpin for SessionAuthority
impl UnsafeUnpin for SessionAuthority
impl UnwindSafe for SessionAuthority
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