#[non_exhaustive]pub struct Query {
pub query_id: String,
pub content: Option<Content>,
/* private fields */
}Expand description
Defines a user inputed query.
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.query_id: StringOutput only. Unique Id for the query.
content: Option<Content>Query content.
Implementations§
Source§impl Query
impl Query
pub fn new() -> Self
Sourcepub fn set_query_id<T: Into<String>>(self, v: T) -> Self
pub fn set_query_id<T: Into<String>>(self, v: T) -> Self
Sets the value of query_id.
Sourcepub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
pub fn set_content<T: Into<Option<Content>>>(self, v: T) -> Self
Sets the value of content.
Note that all the setters affecting content are mutually
exclusive.
Trait Implementations§
impl StructuralPartialEq for Query
Auto Trait Implementations§
impl Freeze for Query
impl RefUnwindSafe for Query
impl Send for Query
impl Sync for Query
impl Unpin for Query
impl UnwindSafe for Query
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