pub struct SetupState {
pub current_step: SetupStep,
pub auth_providers: HashMap<ProviderKind, AuthStatus>,
pub selected_provider: Option<ProviderKind>,
pub oauth_state: Option<OAuthFlowState>,
pub api_key_input: String,
pub oauth_callback_input: String,
pub error_message: Option<String>,
pub provider_cursor: usize,
pub skip_setup: bool,
}Fields§
§current_step: SetupStep§auth_providers: HashMap<ProviderKind, AuthStatus>§selected_provider: Option<ProviderKind>§oauth_state: Option<OAuthFlowState>§api_key_input: String§oauth_callback_input: String§error_message: Option<String>§provider_cursor: usize§skip_setup: boolImplementations§
Source§impl SetupState
impl SetupState
pub fn new(auth_providers: HashMap<ProviderKind, AuthStatus>) -> Self
Sourcepub fn new_for_auth_command(
auth_providers: HashMap<ProviderKind, AuthStatus>,
) -> Self
pub fn new_for_auth_command( auth_providers: HashMap<ProviderKind, AuthStatus>, ) -> Self
Create a SetupState that skips the welcome page - for /auth command
pub fn next_step(&mut self)
pub fn previous_step(&mut self)
pub fn available_providers(&self) -> Vec<ProviderKind>
Trait Implementations§
Source§impl Clone for SetupState
impl Clone for SetupState
Source§fn clone(&self) -> SetupState
fn clone(&self) -> SetupState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SetupState
impl RefUnwindSafe for SetupState
impl Send for SetupState
impl Sync for SetupState
impl Unpin for SetupState
impl UnwindSafe for SetupState
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,
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>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request