pub struct FormBuilder { /* private fields */ }Expand description
A builder for a blocking prompt form.
Implementations§
Source§impl FormBuilder
impl FormBuilder
Sourcepub fn start(self, start: PromptStart) -> Self
pub fn start(self, start: PromptStart) -> Self
Chooses where the prompt starts.
The default is PromptStart::NewLine. The chosen left edge applies
to every row in the prompt region.
Sourcepub fn width(self, width: u16) -> Self
pub fn width(self, width: u16) -> Self
Limits the prompt’s drawing width in terminal cells.
By default the prompt uses the terminal width remaining after its left edge. A supplied width is capped at that same available width. Zero is normalized to the renderer’s one-cell minimum.
Sourcepub fn inline_resize_policy(self, policy: InlineResizePolicy) -> Self
pub fn inline_resize_policy(self, policy: InlineResizePolicy) -> Self
Chooses how this inline prompt responds to a terminal resize.
The default is InlineResizePolicy::ReturnError. Clearing and
redrawing must be selected explicitly because it erases the complete
visible primary-buffer viewport, including content outside the prompt.
Sourcepub fn build(self) -> Result<Form, FormBuildError>
pub fn build(self) -> Result<Form, FormBuildError>
Validates group presence and field-name uniqueness.
Auto Trait Implementations§
impl Freeze for FormBuilder
impl !RefUnwindSafe for FormBuilder
impl !Send for FormBuilder
impl !Sync for FormBuilder
impl Unpin for FormBuilder
impl UnsafeUnpin for FormBuilder
impl !UnwindSafe for FormBuilder
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