pub struct DriverReplySink { /* private fields */ }Expand description
Concrete ReplySink implementation for the driver.
If dropped without send_reply being called, automatically sends
VoxError::Cancelled to the caller. This guarantees that every
request attempt receives exactly one terminal response
(rpc.response.one-per-request), even if the handler panics or
forgets to reply.
Trait Implementations§
Source§impl Drop for DriverReplySink
impl Drop for DriverReplySink
Source§impl Handler<DriverReplySink> for Box<dyn ErasedHandler>
impl Handler<DriverReplySink> for Box<dyn ErasedHandler>
Source§fn retry_policy(&self, method_id: MethodId) -> RetryPolicy
fn retry_policy(&self, method_id: MethodId) -> RetryPolicy
Return the static retry policy for a method ID served by this handler.
Source§fn args_have_channels(&self, method_id: MethodId) -> bool
fn args_have_channels(&self, method_id: MethodId) -> bool
Return whether the method’s argument shape contains any channels.
Source§fn response_wire_shape(&self, method_id: MethodId) -> Option<&'static Shape>
fn response_wire_shape(&self, method_id: MethodId) -> Option<&'static Shape>
Return the canonical wire response shape for a method, if known. Read more
Source§async fn handle(
&self,
call: SelfRef<RequestCall<'static>>,
reply: DriverReplySink,
schemas: Arc<SchemaRecvTracker>,
)
async fn handle( &self, call: SelfRef<RequestCall<'static>>, reply: DriverReplySink, schemas: Arc<SchemaRecvTracker>, )
Dispatch an incoming call to the appropriate method implementation.
Source§impl ReplySink for DriverReplySink
impl ReplySink for DriverReplySink
Source§async fn send_reply(self, response: RequestResponse<'_>)
async fn send_reply(self, response: RequestResponse<'_>)
Send the terminal response for this request attempt, consuming the sink.
Any error that happens during
send_reply must set a flag in the driver
for it to resolve the attempt as failed. Read moreSource§fn channel_binder(&self) -> Option<&dyn ChannelBinder>
fn channel_binder(&self) -> Option<&dyn ChannelBinder>
Return a channel binder for binding Tx/Rx handles in deserialized args. Read more
Source§fn request_id(&self) -> Option<RequestId>
fn request_id(&self) -> Option<RequestId>
Return the wire-level request identifier for this reply sink when available.
Source§fn connection_id(&self) -> Option<ConnectionId>
fn connection_id(&self) -> Option<ConnectionId>
Return the virtual connection identifier for this reply sink when available.
Auto Trait Implementations§
impl Freeze for DriverReplySink
impl !RefUnwindSafe for DriverReplySink
impl Send for DriverReplySink
impl Sync for DriverReplySink
impl Unpin for DriverReplySink
impl UnsafeUnpin for DriverReplySink
impl !UnwindSafe for DriverReplySink
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