Struct seshat::SearchConfig
source[−]pub struct SearchConfig { /* private fields */ }
Expand description
Search configuration A search configuration allows users to limit the search to a specific room or limit the search to specific event types. The search result can be configured in various ways as well.
Implementations
Limit the search to a specific room. The default is to search all rooms.
Arguments
room_id
- The unique id of the room.
Limit the number of events that will be returned in the search result. The default for the limit is 10.
Arguments
limit
- The max number of events to return in the search result.
Limit the number of events that happened before our matching event in the search result. The default for the limit is 0.
Arguments
limit
- The max number of contextual events to return in the search result.
Limit the number of events that happened after our matching event in the search result. The default for the limit is 0.
Arguments
limit
- The max number of contextual events to return in the search result.
Should the matching events be ordered by recency. The default is to order them by the search score.
Arguments
order_by_recency
- Flag to determine if we should order by recency. result.
Set the event types that should be used as search keys.
This limits which events will be searched for. This method can be called multiple times to add multiple event types. The default is to search all event types.
Arguments
key
- The event type that should be included in the search.
The point to return events from. If given, this should be a next_batch result from a previous search.
Trait Implementations
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
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for SearchConfig
impl Send for SearchConfig
impl Sync for SearchConfig
impl Unpin for SearchConfig
impl UnwindSafe for SearchConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more