pub struct SubscriptionHandle { /* private fields */ }Expand description
Handle returned by channel subscriptions for receiving validated envelopes.
Owns the subscriber’s beamr pid, the shared inbox, and a clone of the scheduler so the process can be terminated when the subscription ends. The handle is the subscription’s lifetime: dropping the last clone terminates the subscriber process, whose EXIT prunes the channel actor’s fan-out list.
Implementations§
Source§impl SubscriptionHandle
impl SubscriptionHandle
Sourcepub fn try_next(&self) -> Result<Option<Envelope>, LiminalError>
pub fn try_next(&self) -> Result<Option<Envelope>, LiminalError>
Attempts to receive the next delivered envelope without blocking.
§Errors
Returns LiminalError::SubscriptionFailed when the subscription inbox cannot be read.
Trait Implementations§
Source§impl Clone for SubscriptionHandle
impl Clone for SubscriptionHandle
Source§fn clone(&self) -> SubscriptionHandle
fn clone(&self) -> SubscriptionHandle
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for SubscriptionHandle
impl !UnwindSafe for SubscriptionHandle
impl Freeze for SubscriptionHandle
impl Send for SubscriptionHandle
impl Sync for SubscriptionHandle
impl Unpin for SubscriptionHandle
impl UnsafeUnpin for SubscriptionHandle
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