pub struct RpcDispatcher { /* private fields */ }Expand description
Per-connection dispatcher. Shared state lives in RpcContext.
Implementations§
Source§impl RpcDispatcher
impl RpcDispatcher
pub fn new( ctx: Arc<RpcContext>, writer_tx: Sender<String>, peer_label: String, ) -> Self
Sourcepub async fn run(&mut self, transport: &mut (dyn RpcTransport + Send))
pub async fn run(&mut self, transport: &mut (dyn RpcTransport + Send))
Read frames from transport, dispatch, repeat.
Auto Trait Implementations§
impl Freeze for RpcDispatcher
impl !RefUnwindSafe for RpcDispatcher
impl Send for RpcDispatcher
impl Sync for RpcDispatcher
impl Unpin for RpcDispatcher
impl UnsafeUnpin for RpcDispatcher
impl !UnwindSafe for RpcDispatcher
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more