Skip to main content

Outbox

Struct Outbox 

Source
pub struct Outbox<T> { /* private fields */ }
Expand description

A node’s writer on one of its output queues.

Implementations§

Source§

impl<T> Outbox<T>

Source

pub fn cx(&self) -> &Rc<NodeCx>

The node context the outbox charges.

Source

pub fn has_room(&self) -> bool

Whether the queue would take an item right now.

Source

pub fn emit( &mut self, at: Provenance, payload: T, ) -> impl Future<Output = ()> + '_

Sends an event, waiting for room in the queue.

Source

pub fn gap(&mut self, range: TickRange) -> impl Future<Output = ()> + '_

Tells the readers that range is missing.

Source

pub fn progress(&mut self, tick: Tick) -> impl Future<Output = ()> + '_

Tells the readers that nothing more comes before tick.

Source

pub fn end(&mut self, tick: Tick) -> impl Future<Output = ()> + '_

Ends the stream at tick.

Source

pub fn progress_sink(&self) -> ProgressSink

Where a cursor over a contract passes progress on while the decoder reads a frame through it, and where the decoder says what it still holds: this output, without its event type. Every call returns a handle to the same state.

Trait Implementations§

Source§

impl<T> Debug for Outbox<T>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for Outbox<T>

§

impl<T> !Send for Outbox<T>

§

impl<T> !Sync for Outbox<T>

§

impl<T> !UnwindSafe for Outbox<T>

§

impl<T> Freeze for Outbox<T>
where Rc<RefCell<Broadcast<T>>>: Freeze,

§

impl<T> Unpin for Outbox<T>
where Rc<RefCell<Broadcast<T>>>: Unpin,

§

impl<T> UnsafeUnpin for Outbox<T>

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.