pub struct Supplicant<'a> {
pub controller: &'a ClientControllerProxy,
pub state_update_stream: &'a mut ClientStateUpdatesRequestStream,
pub security_type: SecurityType,
pub password: Option<&'a str>,
}Expand description
A client supplicant.
Provides the client and security components necessary to attempt a connection via Policy.
Fields§
§controller: &'a ClientControllerProxy§state_update_stream: &'a mut ClientStateUpdatesRequestStream§security_type: SecurityType§password: Option<&'a str>Implementations§
Source§impl<'a> Supplicant<'a>
impl<'a> Supplicant<'a>
Sourcepub fn reborrow(&mut self) -> Supplicant<'_>
pub fn reborrow(&mut self) -> Supplicant<'_>
Clones the supplicant through reborrowing of mutable references.
§Examples
This function can be used for templating.
ⓘ
let mut supplicant = Supplicant { /* ... */ }; // Template.
// ...
// Connect via the template supplicant but with a particular password.
let _ = connect(Supplicant { password: "********", ..supplicant.reborrow() });Auto Trait Implementations§
impl<'a> Freeze for Supplicant<'a>
impl<'a> !RefUnwindSafe for Supplicant<'a>
impl<'a> Send for Supplicant<'a>
impl<'a> Sync for Supplicant<'a>
impl<'a> Unpin for Supplicant<'a>
impl<'a> !UnwindSafe for Supplicant<'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
Mutably borrows from an owned value. Read more
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]§impl<T> IntoAny for T
impl<T> IntoAny 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>
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