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: SearchDirection
Direction 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: SearchFilter
Additional 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 last_with_prefix_and_cwd(
prefix: String,
session: Option<HistorySessionId>
) -> SearchQuery
pub fn last_with_prefix_and_cwd( prefix: String, session: Option<HistorySessionId> ) -> SearchQuery
Get the most recent entry starting with the prefix
and cwd
same as the current cwd
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