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.
Trait Implementations§
Source§impl Attached for CallerHandle
impl Attached for CallerHandle
Source§fn catalog(&self) -> &CatalogRef
fn catalog(&self) -> &CatalogRef
The catalog this port serves.
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>
Sends a command and returns the correlation of its outcome.
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>
Sends a query and returns the correlation of its reply.
Source§fn ack(&mut self, c: Correlation) -> Option<Result<(), CallError>>
fn ack(&mut self, c: Correlation) -> Option<Result<(), CallError>>
A command’s delivery acknowledgment (ridl §6.1), once it is known:
Ok(()) when accepted, Err(CallError::Contract(_)) when rejected,
Err(CallError::Transport(Transport::Corrupt)) when the provider could
not read the command’s argument bytes, 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>
A query’s reply, once it is known: the reply bytes copied into the front
of
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)
Releases a correlation whose outcome the caller no longer needs.
Auto Trait Implementations§
impl Freeze for CallerHandle
impl RefUnwindSafe for CallerHandle
impl Send for CallerHandle
impl Sync for CallerHandle
impl Unpin for CallerHandle
impl UnsafeUnpin for CallerHandle
impl UnwindSafe for CallerHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more