pub struct RoutingSlot { /* private fields */ }Expand description
Holds the active routing function for a channel and supports hot deployment.
Deploying a new version atomically swaps the active reference. In-flight executions hold their own clone of the previous function and complete normally; the previous module stays loaded until those clones are dropped.
Implementations§
Source§impl RoutingSlot
impl RoutingSlot
Sourcepub const fn new(initial: RoutingFunction) -> Self
pub const fn new(initial: RoutingFunction) -> Self
Creates a slot holding initial as the active routing function.
Sourcepub fn current(&self) -> RoutingFunction
pub fn current(&self) -> RoutingFunction
Returns a handle to the currently active routing function.
Sourcepub fn deploy(&self, next: RoutingFunction)
pub fn deploy(&self, next: RoutingFunction)
Hot-deploys next as the active routing function.
Sourcepub fn active_hash(&self) -> ContentHash
pub fn active_hash(&self) -> ContentHash
Returns the content hash of the active routing function.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for RoutingSlot
impl RefUnwindSafe for RoutingSlot
impl Send for RoutingSlot
impl Sync for RoutingSlot
impl Unpin for RoutingSlot
impl UnsafeUnpin for RoutingSlot
impl UnwindSafe for RoutingSlot
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