pub struct BackendSlot(/* private fields */);Expand description
An opaque, session-scoped name for one entry of the worker’s backend registry.
It is an index into Mux::backend_registry and nothing else: the core
can carry it, compare it and hand it back, and cannot turn it into a
Backend. Only the embedder resolves it, which is what keeps
Rc<RefCell<Backend>> out of the core (#1340, Question 12).
Session-scoped rather than derived from (cluster_id, backend_id) on
purpose. A reload that replaces a registry entry mid-session builds a NEW
Rc, which takes a NEW slot, so connections opened before it keep charging
the handle they were dialled against — exactly what holding the Rc
inside Position::Client used to do. Keying on the backend’s name instead
would split a balanced start/end pair across two Backend values: the
superseded one would keep a charge forever and the fresh one would
saturate at zero.
Trait Implementations§
Source§impl Clone for BackendSlot
impl Clone for BackendSlot
impl Copy for BackendSlot
Source§impl Debug for BackendSlot
impl Debug for BackendSlot
impl Eq for BackendSlot
Source§impl Hash for BackendSlot
impl Hash for BackendSlot
Source§impl Ord for BackendSlot
impl Ord for BackendSlot
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for BackendSlot
impl PartialEq for BackendSlot
Source§impl PartialOrd for BackendSlot
impl PartialOrd for BackendSlot
impl StructuralPartialEq for BackendSlot
Auto Trait Implementations§
impl Freeze for BackendSlot
impl RefUnwindSafe for BackendSlot
impl Send for BackendSlot
impl Sync for BackendSlot
impl Unpin for BackendSlot
impl UnsafeUnpin for BackendSlot
impl UnwindSafe for BackendSlot
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.