#[non_exhaustive]pub struct TextInput {
pub input: String,
pub context: Option<ConversationContext>,
/* private fields */
}Available on crate feature
conversational-search-service only.Expand description
Defines text input.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.input: StringText input.
context: Option<ConversationContext>Conversation context of the input.
Implementations§
Source§impl TextInput
impl TextInput
pub fn new() -> Self
Sourcepub fn set_context<T>(self, v: T) -> Selfwhere
T: Into<ConversationContext>,
pub fn set_context<T>(self, v: T) -> Selfwhere
T: Into<ConversationContext>,
Sourcepub fn set_or_clear_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConversationContext>,
pub fn set_or_clear_context<T>(self, v: Option<T>) -> Selfwhere
T: Into<ConversationContext>,
Trait Implementations§
impl StructuralPartialEq for TextInput
Auto Trait Implementations§
impl Freeze for TextInput
impl RefUnwindSafe for TextInput
impl Send for TextInput
impl Sync for TextInput
impl Unpin for TextInput
impl UnwindSafe for TextInput
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