[−][src]Struct seshat::SearchConfig
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.
Methods
impl SearchConfig
[src]
pub fn new() -> Self
[src]
Create a new default search configuration.
pub fn for_room(&mut self, room_id: &str) -> &mut Self
[src]
Limit the search to a specific room. The default is to search all rooms.
Arguments
room_id
- The unique id of the room.
pub fn limit(&mut self, limit: usize) -> &mut Self
[src]
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.
pub fn before_limit(&mut self, limit: usize) -> &mut Self
[src]
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.
pub fn after_limit(&mut self, limit: usize) -> &mut Self
[src]
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.
pub fn order_by_recency(&mut self, order_by_recency: bool) -> &mut Self
[src]
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.
pub fn with_key(&mut self, key: EventType) -> &mut Self
[src]
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.
Trait Implementations
impl Clone for SearchConfig
[src]
fn clone(&self) -> SearchConfig
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for SearchConfig
[src]
impl Default for SearchConfig
[src]
impl PartialEq<SearchConfig> for SearchConfig
[src]
fn eq(&self, other: &SearchConfig) -> bool
[src]
fn ne(&self, other: &SearchConfig) -> bool
[src]
impl StructuralPartialEq for SearchConfig
[src]
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Send + Sync + Any,
T: Send + Sync + Any,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T> Fruit for T where
T: Send + Downcast,
[src]
T: Send + Downcast,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,