Skip to main content

SinkCall

Struct SinkCall 

Source
pub struct SinkCall<R: ReplySink> { /* private fields */ }
Expand description

Concrete Call implementation backed by a ReplySink.

Constructed by the dispatcher and handed to the server method. When the server calls Call::reply, the result is serialized and sent through the sink.

Implementations§

Source§

impl<R: ReplySink> SinkCall<R>

Source

pub fn new(reply: R) -> Self

Trait Implementations§

Source§

impl<'wire, T, E, R> Call<'wire, T, E> for SinkCall<R>
where T: Facet<'wire> + MaybeSend, E: Facet<'wire> + MaybeSend, R: ReplySink,

Source§

async fn reply(self, result: Result<T, E>)

Send a Result back to the caller, consuming this Call.
Source§

fn ok(self, value: T) -> impl Future<Output = ()> + MaybeSend
where Self: Sized,

Send a successful response back to the caller, consuming this Call. Read more
Source§

fn err(self, error: E) -> impl Future<Output = ()> + MaybeSend
where Self: Sized,

Send an error response back to the caller, consuming this Call. Read more

Auto Trait Implementations§

§

impl<R> Freeze for SinkCall<R>
where R: Freeze,

§

impl<R> RefUnwindSafe for SinkCall<R>
where R: RefUnwindSafe,

§

impl<R> Send for SinkCall<R>

§

impl<R> Sync for SinkCall<R>

§

impl<R> Unpin for SinkCall<R>
where R: Unpin,

§

impl<R> UnsafeUnpin for SinkCall<R>
where R: UnsafeUnpin,

§

impl<R> UnwindSafe for SinkCall<R>
where R: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> MaybeSend for T
where T: Send,

Source§

impl<T> MaybeSync for T
where T: Sync,