pub struct ChannelBuilder<SF, CS = (), MH = (), MSG = ()> { /* private fields */ }
Implementations§
Source§impl<SF> ChannelBuilder<SF>where
SF: SerdeFormat,
impl<SF> ChannelBuilder<SF>where
SF: SerdeFormat,
pub fn new(serde_format: SF) -> ChannelBuilder<SF>
Source§impl<SF, MSG> ChannelBuilder<SF, (), (), MSG>where
SF: SerdeFormat,
impl<SF, MSG> ChannelBuilder<SF, (), (), MSG>where
SF: SerdeFormat,
pub fn call_and_serve<T, S: RpcServiceSchema, CS>( self, service: impl FnOnce(XyRpcChannel<SF, CS>) -> T, ) -> ChannelBuilder<SF, CS, FnServiceFactory<impl FnOnce(XyRpcChannel<SF, CS>) -> RpcMsgHandlerWrapper<T>, (CS, S)>, MSG>
pub fn only_serve<T, S: RpcServiceSchema>(
self,
service: impl FnOnce(XyRpcChannel<SF>) -> T,
) -> ChannelBuilder<SF, (), FnServiceFactory<impl FnOnce(XyRpcChannel<SF>) -> RpcMsgHandlerWrapper<T>, ((), S)>, MSG>where
RpcMsgHandlerWrapper<T>: RpcMsgHandler<S>,
Source§impl<F, MH, MSG> ChannelBuilder<F, (), MH, MSG>
impl<F, MH, MSG> ChannelBuilder<F, (), MH, MSG>
pub fn only_call<CS: RpcServiceSchema>(self) -> ChannelBuilder<F, CS, MH, MSG>
Source§impl<SF, CS, MH, MSG> ChannelBuilder<SF, CS, MH, MSG>where
SF: SerdeFormat,
impl<SF, CS, MH, MSG> ChannelBuilder<SF, CS, MH, MSG>where
SF: SerdeFormat,
pub fn build_from_read_write( self, (read, write): (impl AsyncRead + Unpin + MaybeSend + 'static, impl AsyncWrite + Unpin + MaybeSend + 'static), ) -> (XyRpcChannel<SF, CS>, impl Future<Output = Result<(), RpcError>> + MaybeSend + 'static)
pub fn build_from_transport( self, transport_sink: impl RpcTransportSink + Unpin, transport_stream: impl RpcTransportStream + Unpin, ) -> (XyRpcChannel<SF, CS>, impl Future<Output = Result<(), RpcError>> + MaybeSend + 'static)
Trait Implementations§
Source§impl<SF: SerdeFormat> Clone for ChannelBuilder<SF, (), ()>
impl<SF: SerdeFormat> Clone for ChannelBuilder<SF, (), ()>
Auto Trait Implementations§
impl<SF, CS, MH, MSG> Freeze for ChannelBuilder<SF, CS, MH, MSG>
impl<SF, CS, MH, MSG> RefUnwindSafe for ChannelBuilder<SF, CS, MH, MSG>
impl<SF, CS, MH, MSG> Send for ChannelBuilder<SF, CS, MH, MSG>
impl<SF, CS, MH, MSG> Sync for ChannelBuilder<SF, CS, MH, MSG>
impl<SF, CS, MH, MSG> Unpin for ChannelBuilder<SF, CS, MH, MSG>
impl<SF, CS, MH, MSG> UnwindSafe for ChannelBuilder<SF, CS, MH, MSG>
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