Skip to main content

SourceHandle

Struct SourceHandle 

Source
pub struct SourceHandle { /* private fields */ }
Expand description

The EventSource port role: one subscription set and one queue, both in the store under this handle’s identity.

Each source handle receives its own copy of every occurrence raised while it is subscribed, so two consumers of one event never consume each other’s occurrences.

Trait Implementations§

Source§

impl Attached for SourceHandle

Source§

fn catalog(&self) -> &CatalogRef

The catalog this port serves.
Source§

impl Drop for SourceHandle

The source’s waker is dropped after the lock is released: it may be the last reference to a task that owns another handle of this runtime, and that handle’s own Drop takes the lock.

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more
Source§

impl EventSource for SourceHandle

Source§

fn subscribe( &mut self, iface: InterfaceNo, ords: &[Ordinal], ) -> Result<(), SubscribeError>

Starts delivery of the listed events.
Source§

fn unsubscribe(&mut self, iface: InterfaceNo, ords: &[Ordinal])

Stops delivery of the listed events.
Source§

fn next(&mut self, out: &mut [u8]) -> Result<Option<RawOccurrence>, ReadError>

Copies the next occurrence into the front of out. Ok(None) when no occurrence is waiting. Read more
Source§

impl Wakeable for SourceHandle

Stores one Event waker, whatever interface it was registered under, woken by any raise that queues an occurrence for this source.

Source§

fn wake_on(&self, what: Interest, waker: &Waker)

Wakes waker when the thing what names may have changed, under the contract above.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.