pub struct CallerHandle<E: Encoding = FlatBuffers> { /* private fields */ }Expand description
The Caller port role.
One counter for the whole handle, not one per channel: on a call the scope is the caller instance (ADR-0021 decision 5, and driftsys/ridl#308’s own report), so every call this caller sends draws from one sequence. That is what keeps two callers on one provider from colliding.
The call table is the runtime’s, shared by every caller: with
Loopback::SLOTS calls sent and not forgotten,
a send answers SendError::Busy and draws no sequence number, because
nothing was sent.
Trait Implementations§
Source§impl<E: Encoding> Attached for CallerHandle<E>
impl<E: Encoding> Attached for CallerHandle<E>
Source§fn catalog(&self) -> &CatalogRef
fn catalog(&self) -> &CatalogRef
Source§impl<E: Encoding> Caller for CallerHandle<E>
impl<E: Encoding> Caller for CallerHandle<E>
Source§fn command(
&mut self,
iface: InterfaceNo,
ord: Ordinal,
args: &[u8],
trace: Option<TraceContext>,
) -> Result<Correlation, SendError>
fn command( &mut self, iface: InterfaceNo, ord: Ordinal, args: &[u8], trace: Option<TraceContext>, ) -> Result<Correlation, SendError>
Source§fn query(
&mut self,
iface: InterfaceNo,
ord: Ordinal,
args: &[u8],
trace: Option<TraceContext>,
) -> Result<Correlation, SendError>
fn query( &mut self, iface: InterfaceNo, ord: Ordinal, args: &[u8], trace: Option<TraceContext>, ) -> Result<Correlation, SendError>
Source§fn ack(&mut self, c: Correlation) -> Option<Result<(), CallError>>
fn ack(&mut self, c: Correlation) -> Option<Result<(), CallError>>
Ok(()) when accepted, Err(CallError::Contract(_)) when rejected,
Err(CallError::Transport(Transport::Corrupt)) when the provider could
not read the command’s argument bytes,
Err(CallError::Transport(Transport::Busy)) when the providing runtime
refused the command at admission, and
Err(CallError::Transport(Transport::Undelivered)) when no
acknowledgment came within the bound. None while unknown, and always
None for a query’s correlation. Read moreSource§fn reply(
&mut self,
c: Correlation,
out: &mut [u8],
) -> Result<Option<Result<usize, CallError>>, ReadError>
fn reply( &mut self, c: Correlation, out: &mut [u8], ) -> Result<Option<Result<usize, CallError>>, ReadError>
out and their length, or the error. Ok(None) while unknown.
ReadError::Short does not consume the reply. Read moreSource§fn forget(&mut self, c: Correlation)
fn forget(&mut self, c: Correlation)
Source§impl<E: Encoding> Clock for CallerHandle<E>
The caller reads the runtime’s one clock, so a generated async Client
can compute a call’s deadline over this handle alone.
impl<E: Encoding> Clock for CallerHandle<E>
The caller reads the runtime’s one clock, so a generated async Client
can compute a call’s deadline over this handle alone.
Source§impl<E: Encoding> Drop for CallerHandle<E>
A dropped caller’s Slot waker leaves the store, and every call it sent
and did not forget is forgotten, so its slot comes back. The waker is
dropped after the lock is released, as the source’s is.
impl<E: Encoding> Drop for CallerHandle<E>
A dropped caller’s Slot waker leaves the store, and every call it sent
and did not forget is forgotten, so its slot comes back. The waker is
dropped after the lock is released, as the source’s is.
Source§impl<E: Encoding> Encoded for CallerHandle<E>
impl<E: Encoding> Encoded for CallerHandle<E>
Source§impl<E: Encoding> Wakeable for CallerHandle<E>
Stores one Outcome waker per call, kept with the call and woken by its
settlement, its forget, the drop of this handle, or a displacement by
another task. Stores one Slot waker, woken at once while a slot is free
and otherwise by the next reclaim.
impl<E: Encoding> Wakeable for CallerHandle<E>
Stores one Outcome waker per call, kept with the call and woken by its
settlement, its forget, the drop of this handle, or a displacement by
another task. Stores one Slot waker, woken at once while a slot is free
and otherwise by the next reclaim.