[−][src]Struct tarpc_lib::server::Channel
Responds to all requests with request_handler
.
The server end of an open connection with a client.
Methods
impl<Req, Resp, T> Channel<Req, Resp, T> where
T: Transport<Item = ClientMessage<Req>, SinkItem = Response<Resp>> + Send,
Req: Send,
Resp: Send,
[src]
T: Transport<Item = ClientMessage<Req>, SinkItem = Response<Resp>> + Send,
Req: Send,
Resp: Send,
pub fn client_addr(&self) -> &SocketAddr
[src]
Returns the address of the client connected to the channel.
pub fn respond_with<F, Fut>(self, f: F) -> impl Future<Output = ()> where
F: FnOnce(Context, Req) -> Fut + Send + 'static + Clone,
Fut: Future<Output = Result<Resp>> + Send + 'static,
Req: 'static,
Resp: 'static,
[src]
F: FnOnce(Context, Req) -> Fut + Send + 'static + Clone,
Fut: Future<Output = Result<Resp>> + Send + 'static,
Req: 'static,
Resp: 'static,
Respond to requests coming over the channel with f
. Returns a future that drives the
responses and resolves when the connection is closed.
Trait Implementations
impl<Req, Resp, T> Drop for Channel<Req, Resp, T>
[src]
impl<Req: Debug, Resp: Debug, T: Debug> Debug for Channel<Req, Resp, T>
[src]
Auto Trait Implementations
impl<Req, Resp, T> Send for Channel<Req, Resp, T> where
Req: Send,
Resp: Send,
T: Send,
Req: Send,
Resp: Send,
T: Send,
impl<Req, Resp, T> Sync for Channel<Req, Resp, T> where
Req: Sync,
Resp: Sync,
T: Sync,
Req: Sync,
Resp: Sync,
T: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,