pub struct ProviderFormFields {Show 18 fields
pub label: String,
pub label_entry: bool,
pub url: String,
pub token: String,
pub profile: String,
pub project: String,
pub compartment: String,
pub regions: String,
pub alias_prefix: String,
pub user: String,
pub identity_file: String,
pub verify_tls: bool,
pub auto_sync: bool,
pub vault_role: String,
pub vault_addr: String,
pub focused_field: ProviderFormField,
pub cursor_pos: usize,
pub expanded: bool,
}Expand description
Form state for configuring a provider.
Fields§
§label: StringLabel being entered for a new labeled config. Only visible in the form
when label_entry is true (the _ => branch of open_add_config_flow).
Migration, bare add, and edit flows keep this empty and label_entry
false so the field stays hidden and the label is sourced from form_id.
label_entry: boolWhether the form was opened to collect a label from the user. Drives
visible_fields prepending Label, the initial focus, and the
submit-time write of label back into form_id.label.
url: String§token: String§profile: String§project: String§compartment: String§regions: String§alias_prefix: String§user: String§identity_file: String§verify_tls: bool§auto_sync: bool§vault_role: String§vault_addr: StringOptional VAULT_ADDR override. Empty = inherit parent env. The
rendered input is progressively disclosed: the field is only visible
in the provider form when vault_role is non-empty.
focused_field: ProviderFormField§cursor_pos: usize§expanded: boolProgressive disclosure: false = required fields only, true = all fields. Excluded from dirty detection (UI-only state).
Implementations§
Source§impl ProviderFormFields
impl ProviderFormFields
pub fn focused_value(&self) -> &str
pub fn focused_value_mut(&mut self) -> Option<&mut String>
Sourcepub fn visible_fields(&self, provider: &str) -> Vec<ProviderFormField>
pub fn visible_fields(&self, provider: &str) -> Vec<ProviderFormField>
Filter fields_for(provider) to the fields that should actually be
rendered and receive focus. Two dynamic adjustments:
Labelis prepended whenlabel_entryis true so the user is asked for a new config name on the third-and-onward add (issue #51).VaultAddris only visible whenvault_roleis non-empty, mirroring the host form’s progressive disclosure.
pub fn insert_char(&mut self, c: char)
pub fn delete_char_before_cursor(&mut self)
pub fn sync_cursor_to_end(&mut self)
Trait Implementations§
Source§impl Clone for ProviderFormFields
impl Clone for ProviderFormFields
Source§fn clone(&self) -> ProviderFormFields
fn clone(&self) -> ProviderFormFields
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ProviderFormFields
impl RefUnwindSafe for ProviderFormFields
impl Send for ProviderFormFields
impl Sync for ProviderFormFields
impl Unpin for ProviderFormFields
impl UnsafeUnpin for ProviderFormFields
impl UnwindSafe for ProviderFormFields
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