pub struct BackendConnection {
pub stream: Stream,
pub endpoint: String,
pub route: BackendConnectionRoute,
pub negotiated: Option<Negotiated>,
}Expand description
Open backend connection returned by connect_to_backend.
Fields§
§stream: StreamConnected local socket stream.
endpoint: StringEndpoint that was connected.
For BackendConnectionRoute::HandlePassed this is the negotiated
backend_pipe — useful as the Hello-skip cache key — even though the
stream is the original broker connection rather than a fresh connect
to that endpoint.
route: BackendConnectionRouteRoute used to establish the connection.
negotiated: Option<Negotiated>Broker negotiation metadata when the broker path was used.
Implementations§
Source§impl BackendConnection
impl BackendConnection
Sourcepub fn handoff_token(&self) -> Option<&[u8]>
pub fn handoff_token(&self) -> Option<&[u8]>
Pending one-time handoff token issued by the broker, if any.
Non-empty only when both sides negotiated CAP_HANDLE_PASSING. By
default the client still connects via Negotiated.backend_pipe and
the route stays BackendConnectionRoute::BrokerNegotiated; when the
caller opted in via
ConnectBackendRequest::adopt_handed_off_connection and the broker
confirmed the handoff, the route is
BackendConnectionRoute::HandlePassed and this token is the one the
confirmation echoed (#354).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BackendConnection
impl RefUnwindSafe for BackendConnection
impl Send for BackendConnection
impl Sync for BackendConnection
impl Unpin for BackendConnection
impl UnsafeUnpin for BackendConnection
impl UnwindSafe for BackendConnection
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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>
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>
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