pub struct CallerHandle { /* 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 Attached for CallerHandle
impl Attached for CallerHandle
Source§fn catalog(&self) -> &CatalogRef
fn catalog(&self) -> &CatalogRef
Source§impl Caller for CallerHandle
impl Caller for CallerHandle
Source§fn command(
&mut self,
iface: InterfaceNo,
ord: Ordinal,
args: &[u8],
) -> Result<Correlation, SendError>
fn command( &mut self, iface: InterfaceNo, ord: Ordinal, args: &[u8], ) -> Result<Correlation, SendError>
Source§fn query(
&mut self,
iface: InterfaceNo,
ord: Ordinal,
args: &[u8],
) -> Result<Correlation, SendError>
fn query( &mut self, iface: InterfaceNo, ord: Ordinal, args: &[u8], ) -> 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 Clock for CallerHandle
The caller reads the runtime’s one clock, so a generated async Client
can compute a call’s deadline over this handle alone.
impl Clock for CallerHandle
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 Drop for CallerHandle
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 Drop for CallerHandle
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 Wakeable for CallerHandle
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 Wakeable for CallerHandle
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.