pub(crate) struct Connect<R: Addresses> {
pub(crate) socket: ConnectAddress<R>,
pub(crate) socket_canonical: Option<AddrWithStr<R::SocketAddr>>,
pub(crate) auth: Auth<R>,
pub(crate) socket_address_file: Option<R::Path>,
pub(crate) superuser: bool,
}Expand description
Information for a connect point that is implemented by making a socket connection to an address.
Fields§
§socket: ConnectAddress<R>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.
socket_address_file: Option<R::Path>A file in which the actual value of an inet-auto address should be stored.
superuser: boolIf true, we should allow authenticated connections to this connect point to acquire superuser permissions.
Implementations§
Source§impl Connect<Resolved>
impl Connect<Resolved>
Sourcefn find_connect_address(
&self,
mistrust: &Mistrust,
) -> Result<AddrWithStr<SocketAddr>, ConnectError>
fn find_connect_address( &self, mistrust: &Mistrust, ) -> Result<AddrWithStr<SocketAddr>, ConnectError>
Return the address that we should actually try to connect to, with its string representation set to the canonical address.
Sourcefn do_connect(&self, mistrust: &Mistrust) -> Result<Connection, ConnectError>
fn do_connect(&self, mistrust: &Mistrust) -> Result<Connection, ConnectError>
Try to connect on a “Connect” connect point.
Source§impl Connect<Unresolved>
impl Connect<Unresolved>
Sourcefn resolve(
&self,
resolver: &CfgPathResolver,
) -> Result<Connect<Resolved>, ResolveError>
fn resolve( &self, resolver: &CfgPathResolver, ) -> Result<Connect<Resolved>, ResolveError>
Expand all variables within this Connect to their concrete forms.
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>,
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> UnsafeUnpin for Connect<R>
impl<R> UnwindSafe for Connect<R>
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
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