pub struct SingleWriterSessionRegistry { /* private fields */ }Expand description
Registry enforcing that one native session has at most one writer across all facades.
Implementations§
Source§impl SingleWriterSessionRegistry
impl SingleWriterSessionRegistry
pub fn new() -> SingleWriterSessionRegistry
Sourcepub fn acquire_writer(
&self,
session_id: &str,
node_id: &str,
) -> Result<(), AdapterError>
pub fn acquire_writer( &self, session_id: &str, node_id: &str, ) -> Result<(), AdapterError>
Try to acquire exclusive writer ownership for a session.
Sourcepub fn release_writer(&self, session_id: &str, node_id: &str)
pub fn release_writer(&self, session_id: &str, node_id: &str)
Release writer ownership for a session.
Sourcepub fn current_writer(&self, session_id: &str) -> Option<String>
pub fn current_writer(&self, session_id: &str) -> Option<String>
Get current active writer for a session.
Trait Implementations§
Source§impl Clone for SingleWriterSessionRegistry
impl Clone for SingleWriterSessionRegistry
Source§fn clone(&self) -> SingleWriterSessionRegistry
fn clone(&self) -> SingleWriterSessionRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SingleWriterSessionRegistry
impl Debug for SingleWriterSessionRegistry
Source§impl Default for SingleWriterSessionRegistry
impl Default for SingleWriterSessionRegistry
Source§fn default() -> SingleWriterSessionRegistry
fn default() -> SingleWriterSessionRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Forget for SingleWriterSessionRegistry
impl Freeze for SingleWriterSessionRegistry
impl Move for SingleWriterSessionRegistry
impl RefUnwindSafe for SingleWriterSessionRegistry
impl Send for SingleWriterSessionRegistry
impl Sync for SingleWriterSessionRegistry
impl Unpin for SingleWriterSessionRegistry
impl UnsafeUnpin for SingleWriterSessionRegistry
impl UnwindSafe for SingleWriterSessionRegistry
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