pub enum ProviderFormField {
Show 14 variants
Label,
Url,
Token,
Profile,
Project,
Compartment,
Regions,
AliasPrefix,
User,
IdentityFile,
VerifyTls,
VaultRole,
VaultAddr,
AutoSync,
}Expand description
Which provider form field is focused.
Label is dynamic. The static per-provider arrays (PROXMOX_FIELDS etc.)
never list it; ProviderFormFields::visible_fields() prepends it when the
form was opened to collect a label for a new labeled config. This keeps
fields_for(provider) provider-pure and prevents Label from leaking into
bare-add or edit flows where the label is fixed.
Variants§
Label
Url
Token
Profile
Project
Compartment
Regions
AliasPrefix
User
IdentityFile
VerifyTls
VaultRole
VaultAddr
AutoSync
Implementations§
Source§impl ProviderFormField
impl ProviderFormField
pub fn fields_for(provider: &str) -> &'static [ProviderFormField]
Sourcepub fn is_mandatory_field(field: ProviderFormField, provider: &str) -> bool
pub fn is_mandatory_field(field: ProviderFormField, provider: &str) -> bool
Whether a field is mandatory for form submission (asterisk in renderer).
Distinct from is_required_field which controls progressive disclosure.
AWS: Token and Profile both get an asterisk. At least one must be filled
(Token for inline keys, Profile for ~/.aws/credentials).
Tailscale: Token is optional (empty = local CLI mode).
OVH: Regions (= Endpoint) is mandatory (unlike GCP/Oracle where it has
a meaningful default).
Label: only rendered when the form is in label-entry mode, and always
mandatory there. validate_label("") rejects empties at save time.
Sourcepub fn is_required_field(field: ProviderFormField, provider: &str) -> bool
pub fn is_required_field(field: ProviderFormField, provider: &str) -> bool
Whether a field is shown in collapsed mode (progressive disclosure). Label is always required when present so the user is forced to fill it before reaching the optional tail.
pub fn next(self, fields: &[Self]) -> Self
pub fn prev(self, fields: &[Self]) -> Self
pub fn label(self) -> &'static str
Sourcepub fn is_picker(self, provider: &str) -> bool
pub fn is_picker(self, provider: &str) -> bool
Whether this field opens a picker overlay when activated with Space.
IdentityFile always opens the SSH key picker. Regions opens a
region picker only for providers with structured region lists
(aws/scaleway/gcp/oracle/ovh). Other providers (azure, proxmox, …)
take Regions as free-form text input — Space inserts a literal space.
Sourcepub fn kind(self, provider: &str) -> FieldKind
pub fn kind(self, provider: &str) -> FieldKind
Field kind for crate::ui::design::FieldKind. Toggles take precedence
over pickers (no field is both).
Trait Implementations§
Source§impl Clone for ProviderFormField
impl Clone for ProviderFormField
Source§fn clone(&self) -> ProviderFormField
fn clone(&self) -> ProviderFormField
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProviderFormField
impl Debug for ProviderFormField
Source§impl PartialEq for ProviderFormField
impl PartialEq for ProviderFormField
Source§fn eq(&self, other: &ProviderFormField) -> bool
fn eq(&self, other: &ProviderFormField) -> bool
self and other values to be equal, and is used by ==.impl Copy for ProviderFormField
impl StructuralPartialEq for ProviderFormField
Auto Trait Implementations§
impl Freeze for ProviderFormField
impl RefUnwindSafe for ProviderFormField
impl Send for ProviderFormField
impl Sync for ProviderFormField
impl Unpin for ProviderFormField
impl UnsafeUnpin for ProviderFormField
impl UnwindSafe for ProviderFormField
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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