Struct distant_core::DistantManagerClientConfig
source · [−]pub struct DistantManagerClientConfig {
pub on_challenge: Box<AuthChallengeFn>,
pub on_verify: Box<AuthVerifyFn>,
pub on_info: Box<AuthInfoFn>,
pub on_error: Box<AuthErrorFn>,
}
Expand description
Configuration to use when creating a new DistantManagerClient
Fields
on_challenge: Box<AuthChallengeFn>
on_verify: Box<AuthVerifyFn>
on_info: Box<AuthInfoFn>
on_error: Box<AuthErrorFn>
Implementations
sourceimpl DistantManagerClientConfig
impl DistantManagerClientConfig
sourcepub fn with_empty_prompts() -> Self
pub fn with_empty_prompts() -> Self
Creates a new config with prompts that return empty strings
sourcepub fn with_prompts<PP, PT>(password_prompt: PP, text_prompt: PT) -> Self where
PP: Fn(&str) -> Result<String> + Send + Sync + 'static,
PT: Fn(&str) -> Result<String> + Send + Sync + 'static,
pub fn with_prompts<PP, PT>(password_prompt: PP, text_prompt: PT) -> Self where
PP: Fn(&str) -> Result<String> + Send + Sync + 'static,
PT: Fn(&str) -> Result<String> + Send + Sync + 'static,
Creates a new config with two prompts
password_prompt
- used for prompting for a secret, and should not display what is typedtext_prompt
- used for general text, and is okay to display what is typed
Auto Trait Implementations
impl !RefUnwindSafe for DistantManagerClientConfig
impl Send for DistantManagerClientConfig
impl Sync for DistantManagerClientConfig
impl Unpin for DistantManagerClientConfig
impl !UnwindSafe for DistantManagerClientConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more