Struct RpcDispatcher
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 fn with_peer_cert_fingerprint(self, fingerprint: Option<String>) -> Self
pub fn with_peer_cert_fingerprint(self, fingerprint: Option<String>) -> Self
Bind the client certificate fingerprint from the mTLS handshake (WSS). Additive builder so the socket transport and tests need no change.
Sourcepub fn peer_cert_fingerprint(&self) -> Option<&str>
pub fn peer_cert_fingerprint(&self) -> Option<&str>
The presenting client certificate fingerprint, if this is an mTLS peer.
Sourcepub fn tui_registration(&self) -> Option<(&str, TuiEpoch)>
pub fn tui_registration(&self) -> Option<(&str, TuiEpoch)>
This connection’s registry registration: the TUI id and the epoch it was registered under. Teardown must quote both, so that a connection whose cleanup runs after a reconnect has already adopted the same id cannot evict the live entry.
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 !RefUnwindSafe for RpcDispatcher
impl !UnwindSafe for RpcDispatcher
impl Freeze for RpcDispatcher
impl Send for RpcDispatcher
impl Sync for RpcDispatcher
impl Unpin for RpcDispatcher
impl UnsafeUnpin for RpcDispatcher
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§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