pub struct DriverCaller { /* private fields */ }Expand description
Allocates a request ID, registers a response slot, sends one request attempt through the connection, and awaits the corresponding response.
Implementations§
Source§impl DriverCaller
impl DriverCaller
Sourcepub fn create_tx_channel(
&self,
) -> (ChannelId, Arc<CreditSink<DriverChannelSink>>)
pub fn create_tx_channel( &self, ) -> (ChannelId, Arc<CreditSink<DriverChannelSink>>)
Allocate a channel ID and create a credit-controlled sink for outbound items.
The returned sink enforces credit; the semaphore is registered so
GrantCredit messages can add permits.
Sourcepub fn register_rx_channel(&self, channel_id: ChannelId) -> BoundChannelReceiver
pub fn register_rx_channel(&self, channel_id: ChannelId) -> BoundChannelReceiver
Register an inbound channel (Rx on our side) and return the receiver.
The channel ID comes from the peer (e.g. from RequestCall.channels).
The returned receiver should be bound to an Rx handle via Rx::bind().
Trait Implementations§
Source§impl ChannelBinder for DriverCaller
impl ChannelBinder for DriverCaller
Source§fn create_tx(&self) -> (ChannelId, Arc<dyn ChannelSink>)
fn create_tx(&self) -> (ChannelId, Arc<dyn ChannelSink>)
Allocate a channel ID and create a sink for sending items.
Source§fn create_rx(&self) -> (ChannelId, BoundChannelReceiver)
fn create_rx(&self) -> (ChannelId, BoundChannelReceiver)
Allocate a channel ID, register it for routing, and return a receiver.
Source§fn bind_tx(&self, channel_id: ChannelId) -> Arc<dyn ChannelSink>
fn bind_tx(&self, channel_id: ChannelId) -> Arc<dyn ChannelSink>
Create a sink for a known channel ID (callee side). Read more
Source§fn register_rx(&self, channel_id: ChannelId) -> BoundChannelReceiver
fn register_rx(&self, channel_id: ChannelId) -> BoundChannelReceiver
Register an inbound channel by ID and return the receiver (callee side). Read more
Source§fn channel_liveness(&self) -> Option<ChannelLivenessHandle>
fn channel_liveness(&self) -> Option<ChannelLivenessHandle>
Optional opaque handle that keeps the underlying session/connection alive
for the lifetime of any bound channel handle.
Source§impl Clone for DriverCaller
impl Clone for DriverCaller
Source§fn clone(&self) -> DriverCaller
fn clone(&self) -> DriverCaller
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DriverCaller
impl !RefUnwindSafe for DriverCaller
impl Send for DriverCaller
impl Sync for DriverCaller
impl Unpin for DriverCaller
impl UnsafeUnpin for DriverCaller
impl !UnwindSafe for DriverCaller
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