pub(crate) struct Connect<R: Addresses> {
pub(crate) socket: AddrWithStr<R::SocketAddr>,
pub(crate) socket_canonical: Option<AddrWithStr<R::SocketAddr>>,
pub(crate) auth: Auth<R>,
}
Fields§
§socket: AddrWithStr<R::SocketAddr>
The address of the socket at which the client should try to reach the RPC server, and which the RPC server should bind.
socket_canonical: Option<AddrWithStr<R::SocketAddr>>
The address of the socket which the RPC server believes it is actually listening at.
If absent, defaults to socket
.
This value is only needs to be different from socket
in cases where cookie authentication is in use,
and the client is sandboxed somehow (such as behind a NAT, or inside a container).
auth: Auth<R>
The authentication that the client should try to use, and which the server should require.
Implementations§
Source§impl Connect<Resolved>
impl Connect<Resolved>
Sourcefn do_connect(&self, mistrust: &Mistrust) -> Result<Connection, ConnectError>
Available on crate feature rpc-client
only.
fn do_connect(&self, mistrust: &Mistrust) -> Result<Connection, ConnectError>
rpc-client
only.Try to connect on a “Connect” connect point.
Source§impl Connect<Unresolved>
impl Connect<Unresolved>
Source§impl Connect<Resolved>
impl Connect<Resolved>
Sourcefn validate(self) -> Result<Self, ResolveError>
fn validate(self) -> Result<Self, ResolveError>
Return this Connect
only if its parts are valid and compatible.
Sourcefn check_absolute_paths(&self) -> Result<(), ResolveError>
fn check_absolute_paths(&self) -> Result<(), ResolveError>
Return an error if some path in this Connect
is not absolute.
Trait Implementations§
Source§impl<'de, R: Addresses> Deserialize<'de> for Connect<R>
impl<'de, R: Addresses> Deserialize<'de> for Connect<R>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<R> Freeze for Connect<R>
impl<R> RefUnwindSafe for Connect<R>
impl<R> Send for Connect<R>
impl<R> Sync for Connect<R>
impl<R> Unpin for Connect<R>
impl<R> UnwindSafe for Connect<R>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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