pub struct PromptBuilder { /* private fields */ }
Expand description
Builder for creating prompts with fluent API
Implementations§
Source§impl PromptBuilder
impl PromptBuilder
Sourcepub fn description<S: Into<String>>(self, description: S) -> Self
pub fn description<S: Into<String>>(self, description: S) -> Self
Set the prompt description
Sourcepub fn required_arg<S: Into<String>>(
self,
name: S,
description: Option<S>,
) -> Self
pub fn required_arg<S: Into<String>>( self, name: S, description: Option<S>, ) -> Self
Add a required argument
Sourcepub fn optional_arg<S: Into<String>>(
self,
name: S,
description: Option<S>,
) -> Self
pub fn optional_arg<S: Into<String>>( self, name: S, description: Option<S>, ) -> Self
Add an optional argument
Sourcepub fn build<H>(self, handler: H) -> Promptwhere
H: PromptHandler + 'static,
pub fn build<H>(self, handler: H) -> Promptwhere
H: PromptHandler + 'static,
Build the prompt with the given handler
Auto Trait Implementations§
impl Freeze for PromptBuilder
impl RefUnwindSafe for PromptBuilder
impl Send for PromptBuilder
impl Sync for PromptBuilder
impl Unpin for PromptBuilder
impl UnwindSafe for PromptBuilder
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