Skip to main content

InputTable

Struct InputTable 

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

A connection’s open input halves, keyed by subscription, the slot of BIDIR-5’s rule: (connection, subscription). The transport makes one a connection, puts it on its calls’ FrameSink (with_inputs) and hands it frames.

Implementations§

Source§

impl InputTable

Source

pub fn new(conn: u64, calls: Arc<dyn CallCounter>) -> Arc<Self> ⓘ

The table of connection conn, its calls counted by calls.

Source

pub fn idle(&self) -> bool

Whether no input half is open: one load, so a connection with none reads its frames as it always did.

Source

pub fn strays(&self) -> u64

Input frames that named no call of this connection and could not be told so (a notification has no answer): counted, dropped.

Source

pub fn take_frame(&self, data: &Bytes) -> bool

A whole inbound message, if it is an input notification: true, it is taken. Run on the socket’s reader, in arrival order. A frame with an id goes through the method table, which answers it.

Source

pub fn input(&self, ns: &str, params: &[u8], frame: &Bytes) -> Delivered

{ns}.input: params a slice of frame, or frame itself.

Source

pub fn take_binary(&self, frame: &Bytes) -> Delivered

BIDIR-17: a WebSocket binary message whose first byte is BINARY_INPUT: one item, its payload a slice of frame. Run on the socket’s reader, in arrival order, as Self::take_frame. Malformed (a short header, another tag) is the transport’s to answer; a frame naming no call of this connection is counted.

Source

pub fn end(&self, ns: &str, params: &[u8]) -> Delivered

{ns}.end: its seq is the number of frames sent. Since frames come in order, one that says otherwise has lost count.

Trait Implementations§

Source§

impl Debug for InputTable

Source§

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

Formats the value using the given formatter. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync,

Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more