pub struct ConnectBackendRequest<'a> {
pub broker_endpoint: &'a str,
pub service_name: &'a str,
pub wanted_version: &'a str,
pub self_version: &'a str,
pub cached_backend_endpoint: Option<&'a str>,
pub client_version: &'a str,
pub client_lib_name: &'a str,
pub client_lib_version: &'a str,
pub client_keepalive_secs: u64,
pub adopt_handed_off_connection: bool,
pub handoff_ready_timeout: Duration,
}Expand description
Inputs for connect_to_backend.
Fields§
§broker_endpoint: &'a strBroker pipe/socket endpoint.
service_name: &'a strLogical service name, such as zccache.
wanted_version: &'a strBackend version the caller wants.
self_version: &'a strVersion of the caller’s own service binary.
cached_backend_endpoint: Option<&'a str>Previously negotiated backend endpoint, if the caller has one.
client_version: &'a strInformational client version.
client_lib_name: &'a strClient library name for diagnostics.
client_lib_version: &'a strClient library version for diagnostics.
client_keepalive_secs: u64Proposed keepalive interval.
adopt_handed_off_connection: boolOpt in to adopting a handed-off backend connection (#354, slice 7).
Default false: the client always reconnects to
Negotiated.backend_pipe, exactly as before. When true AND the
broker negotiated CAP_HANDLE_PASSING AND issued a non-empty
Negotiated.handle_passed_token, the client waits up to
Self::handoff_ready_timeout for the broker’s handoff-ready relay
(an EVENT frame under the 0xD0FF handoff payload protocol carrying
the backend’s HandoffAck) on the SAME broker connection. On a valid
accepted relay with a matching token echo, the client keeps that
connection as the backend connection
(BackendConnectionRoute::HandlePassed). Any failure — missing
relay, timeout, refused or malformed ACK, token mismatch — silently
downgrades to the backend_pipe reconnect; adoption failure is never
an error by itself.
handoff_ready_timeout: DurationDeadline for the handoff-ready relay when
Self::adopt_handed_off_connection is set.
Implementations§
Trait Implementations§
Source§impl<'a> Clone for ConnectBackendRequest<'a>
impl<'a> Clone for ConnectBackendRequest<'a>
Source§fn clone(&self) -> ConnectBackendRequest<'a>
fn clone(&self) -> ConnectBackendRequest<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<'a> Freeze for ConnectBackendRequest<'a>
impl<'a> RefUnwindSafe for ConnectBackendRequest<'a>
impl<'a> Send for ConnectBackendRequest<'a>
impl<'a> Sync for ConnectBackendRequest<'a>
impl<'a> Unpin for ConnectBackendRequest<'a>
impl<'a> UnsafeUnpin for ConnectBackendRequest<'a>
impl<'a> UnwindSafe for ConnectBackendRequest<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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