pub struct Gate(/* private fields */);Expand description
A cheap, clonable release handle the engine awaits.
Level-triggered: releasing before anyone waits is observed by every later waiter, so there is no lost-wakeup race. All clones share one release, and the handle is eight bytes.
The engine never awaits a gate on its own — it always races the gate
against session cancellation and EgressConfig::max_hold, so a hook
that never releases cannot make a stream unkillable.
Deliberately a newtype rather than an exposed CancellationToken:
handing the engine the session’s own cancel token would conflate
teardown with object release.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Gate
impl RefUnwindSafe for Gate
impl Send for Gate
impl Sync for Gate
impl Unpin for Gate
impl UnsafeUnpin for Gate
impl UnwindSafe for Gate
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