pub struct SearchInput {
pub query: String,
pub community: Option<String>,
pub mode: Option<SearchMode>,
pub limit: Option<u32>,
pub offset: Option<u32>,
}Expand description
Input for searching posts
Fields§
§query: StringWhat to look for: words for a keyword search, or a description of the topic for a semantic one
community: Option<String>A community name to search within; leave it out to search them all
mode: Option<SearchMode>keyword (the default, always available) matches the words;
semantic finds posts about the same thing even when they use other
words, and falls back to keyword (see degraded on the result) when
the server’s embedding backend is unavailable
limit: Option<u32>Max results (default 25, at most 100)
offset: Option<u32>Results to skip, for paging (default 0)
Implementations§
Trait Implementations§
Source§impl Clone for SearchInput
impl Clone for SearchInput
Source§impl Debug for SearchInput
impl Debug for SearchInput
Source§impl<'de> Deserialize<'de> for SearchInput
impl<'de> Deserialize<'de> for SearchInput
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SearchInput
Source§impl PartialEq for SearchInput
impl PartialEq for SearchInput
Source§impl Serialize for SearchInput
impl Serialize for SearchInput
impl StructuralPartialEq for SearchInput
Auto Trait Implementations§
impl Freeze for SearchInput
impl RefUnwindSafe for SearchInput
impl Send for SearchInput
impl Sync for SearchInput
impl Unpin for SearchInput
impl UnsafeUnpin for SearchInput
impl UnwindSafe for SearchInput
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