pub struct ReverseRegistry { /* private fields */ }Expand description
Thread-safe registry of reverse servers. The runtime inserts a handle per server at startup; the admin route reads snapshots.
Implementations§
Source§impl ReverseRegistry
impl ReverseRegistry
pub fn new() -> Self
Sourcepub fn register(&self, entry: ReverseServerEntry)
pub fn register(&self, entry: ReverseServerEntry)
Register a reverse server. Replaces any prior entry with the same id; in practice ids are unique per supervisor generation.
Sourcepub fn unregister(&self, id: &ReverseServerId)
pub fn unregister(&self, id: &ReverseServerId)
Remove a reverse server entry by id. Called when the supervisor tears the server down.
Sourcepub fn snapshot(&self) -> Vec<ReverseServerEntrySnapshot>
pub fn snapshot(&self) -> Vec<ReverseServerEntrySnapshot>
Snapshot all registered servers’ state.
Trait Implementations§
Source§impl Clone for ReverseRegistry
impl Clone for ReverseRegistry
Source§fn clone(&self) -> ReverseRegistry
fn clone(&self) -> ReverseRegistry
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 Default for ReverseRegistry
impl Default for ReverseRegistry
Source§fn default() -> ReverseRegistry
fn default() -> ReverseRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ReverseRegistry
impl RefUnwindSafe for ReverseRegistry
impl Send for ReverseRegistry
impl Sync for ReverseRegistry
impl Unpin for ReverseRegistry
impl UnsafeUnpin for ReverseRegistry
impl UnwindSafe for ReverseRegistry
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