Struct reedline::SearchQuery
source · pub struct SearchQuery {
pub direction: SearchDirection,
pub start_time: Option<DateTime<Utc>>,
pub end_time: Option<DateTime<Utc>>,
pub start_id: Option<HistoryItemId>,
pub end_id: Option<HistoryItemId>,
pub limit: Option<i64>,
pub filter: SearchFilter,
}Expand description
Query for search in the potentially rich History
Fields§
§direction: SearchDirectionDirection to search in
start_time: Option<DateTime<Utc>>if given, only get results after/before this time (depending on direction)
end_time: Option<DateTime<Utc>>if given, only get results after/before this time (depending on direction)
start_id: Option<HistoryItemId>if given, only get results after/before this id (depending on direction)
end_id: Option<HistoryItemId>if given, only get results after/before this id (depending on direction)
limit: Option<i64>How many results to get
filter: SearchFilterAdditional filters defined with SearchFilter
Implementations§
source§impl SearchQuery
impl SearchQuery
Currently pub ways to construct a query
sourcepub fn all_that_contain_rev(contains: String) -> SearchQuery
pub fn all_that_contain_rev(contains: String) -> SearchQuery
all that contain string in reverse chronological order
sourcepub const fn last_with_search(filter: SearchFilter) -> SearchQuery
pub const fn last_with_search(filter: SearchFilter) -> SearchQuery
Get the most recent entry matching SearchFilter
sourcepub fn last_with_prefix(
prefix: String,
session: Option<HistorySessionId>
) -> SearchQuery
pub fn last_with_prefix( prefix: String, session: Option<HistorySessionId> ) -> SearchQuery
Get the most recent entry starting with the prefix
sourcepub fn everything(
direction: SearchDirection,
session: Option<HistorySessionId>
) -> SearchQuery
pub fn everything( direction: SearchDirection, session: Option<HistorySessionId> ) -> SearchQuery
Query to get all entries in the given SearchDirection
Auto Trait Implementations§
impl RefUnwindSafe for SearchQuery
impl Send for SearchQuery
impl Sync for SearchQuery
impl Unpin for SearchQuery
impl UnwindSafe for SearchQuery
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