pub struct FormField<'a> {
pub _tab: Table<'a>,
}Fields§
§_tab: Table<'a>Implementations§
Source§impl<'a> FormField<'a>
impl<'a> FormField<'a>
pub const VT_NAME: VOffsetT = 4
pub const VT_FIELD_TYPE: VOffsetT = 6
pub const VT_LABEL: VOffsetT = 8
pub const VT_PLACEHOLDER: VOffsetT = 10
pub const VT_DESCRIPTION: VOffsetT = 12
pub const VT_INITIAL_VALUE: VOffsetT = 14
pub const VT_VALIDATIONS: VOffsetT = 16
pub const VT_ASYNC_VALIDATIONS: VOffsetT = 18
pub const VT_OPTIONS: VOffsetT = 20
pub const VT_VISIBLE_WHEN: VOffsetT = 22
pub const VT_DISABLED_WHEN: VOffsetT = 24
pub const VT_AUTOCOMPLETE: VOffsetT = 26
pub const VT_ACCEPT: VOffsetT = 28
pub const VT_MAX_FILE_SIZE: VOffsetT = 30
pub const VT_MULTIPLE: VOffsetT = 32
pub const VT_STEP: VOffsetT = 34
pub const VT_SEMANTIC_NODE_ID: VOffsetT = 36
pub unsafe fn init_from_table(table: Table<'a>) -> Self
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: Allocator + 'bldr>( _fbb: &'mut_bldr mut FlatBufferBuilder<'bldr, A>, args: &'args FormFieldArgs<'args>, ) -> WIPOffset<FormField<'bldr>>
pub fn field_type(&self) -> FormFieldType
pub fn placeholder(&self) -> Option<&'a str>
Sourcepub fn description(&self) -> Option<&'a str>
pub fn description(&self) -> Option<&'a str>
Help text displayed below the field (aria-describedby).
Sourcepub fn initial_value(&self) -> Option<&'a str>
pub fn initial_value(&self) -> Option<&'a str>
Default value.
Sourcepub fn validations(
&self,
) -> Option<Vector<'a, ForwardsUOffset<ValidationRule<'a>>>>
pub fn validations( &self, ) -> Option<Vector<'a, ForwardsUOffset<ValidationRule<'a>>>>
Validation rules (run client-side).
Sourcepub fn async_validations(
&self,
) -> Option<Vector<'a, ForwardsUOffset<AsyncValidation<'a>>>>
pub fn async_validations( &self, ) -> Option<Vector<'a, ForwardsUOffset<AsyncValidation<'a>>>>
Server-side async validations (e.g., uniqueness check).
Sourcepub fn options(&self) -> Option<Vector<'a, ForwardsUOffset<SelectOption<'a>>>>
pub fn options(&self) -> Option<Vector<'a, ForwardsUOffset<SelectOption<'a>>>>
For Select/Radio: available options.
Sourcepub fn visible_when(&self) -> Option<&'a str>
pub fn visible_when(&self) -> Option<&'a str>
Conditional visibility (reference to a ComputeNode or expression).
Sourcepub fn disabled_when(&self) -> Option<&'a str>
pub fn disabled_when(&self) -> Option<&'a str>
Conditional disable.
Sourcepub fn autocomplete(&self) -> AutocompleteHint
pub fn autocomplete(&self) -> AutocompleteHint
Browser autocomplete hint.
Sourcepub fn accept(&self) -> Option<&'a str>
pub fn accept(&self) -> Option<&'a str>
For File: accepted MIME types (e.g., “image/*”, “.pdf”).
Sourcepub fn max_file_size(&self) -> u32
pub fn max_file_size(&self) -> u32
For File: max file size in bytes.
Sourcepub fn semantic_node_id(&self) -> Option<&'a str>
pub fn semantic_node_id(&self) -> Option<&'a str>
Accessibility.
Trait Implementations§
Source§impl Verifiable for FormField<'_>
impl Verifiable for FormField<'_>
Source§fn run_verifier(
v: &mut Verifier<'_, '_>,
pos: usize,
) -> Result<(), InvalidFlatbuffer>
fn run_verifier( v: &mut Verifier<'_, '_>, pos: usize, ) -> Result<(), InvalidFlatbuffer>
Runs the verifier for this type, assuming its at position
pos in the verifier’s buffer.
Should not need to be called directly.impl<'a> Copy for FormField<'a>
impl<'a> StructuralPartialEq for FormField<'a>
Auto Trait Implementations§
impl<'a> Freeze for FormField<'a>
impl<'a> RefUnwindSafe for FormField<'a>
impl<'a> Send for FormField<'a>
impl<'a> Sync for FormField<'a>
impl<'a> Unpin for FormField<'a>
impl<'a> UnsafeUnpin for FormField<'a>
impl<'a> UnwindSafe for FormField<'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