pub struct HierarchicalQuery {
pub domain: Option<String>,
pub task_type: Option<TaskType>,
pub start_time: Option<DateTime<Utc>>,
pub end_time: Option<DateTime<Utc>>,
pub time_bucket: Option<TimeBucket>,
pub limit: usize,
}Expand description
Query filter for hierarchical searches.
Fields§
§domain: Option<String>Filter by domain
task_type: Option<TaskType>Filter by task type
start_time: Option<DateTime<Utc>>Filter by start time
end_time: Option<DateTime<Utc>>Filter by end time
time_bucket: Option<TimeBucket>Time bucket for bucket queries
limit: usizeMaximum number of results
Implementations§
Source§impl HierarchicalQuery
impl HierarchicalQuery
Sourcepub fn with_domain(self, domain: impl Into<String>) -> Self
pub fn with_domain(self, domain: impl Into<String>) -> Self
Set the domain filter.
Sourcepub fn with_task_type(self, task_type: TaskType) -> Self
pub fn with_task_type(self, task_type: TaskType) -> Self
Set the task type filter.
Sourcepub fn with_time_range(self, start: DateTime<Utc>, end: DateTime<Utc>) -> Self
pub fn with_time_range(self, start: DateTime<Utc>, end: DateTime<Utc>) -> Self
Set the time range filter.
Sourcepub fn with_time_bucket(self, bucket: TimeBucket) -> Self
pub fn with_time_bucket(self, bucket: TimeBucket) -> Self
Set the time bucket filter.
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set the result limit.
Trait Implementations§
Source§impl Clone for HierarchicalQuery
impl Clone for HierarchicalQuery
Source§fn clone(&self) -> HierarchicalQuery
fn clone(&self) -> HierarchicalQuery
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HierarchicalQuery
impl Debug for HierarchicalQuery
Source§impl Default for HierarchicalQuery
impl Default for HierarchicalQuery
Source§fn default() -> HierarchicalQuery
fn default() -> HierarchicalQuery
Returns the “default value” for a type. Read more
Source§impl PartialEq for HierarchicalQuery
impl PartialEq for HierarchicalQuery
impl StructuralPartialEq for HierarchicalQuery
Auto Trait Implementations§
impl Freeze for HierarchicalQuery
impl RefUnwindSafe for HierarchicalQuery
impl Send for HierarchicalQuery
impl Sync for HierarchicalQuery
impl Unpin for HierarchicalQuery
impl UnsafeUnpin for HierarchicalQuery
impl UnwindSafe for HierarchicalQuery
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.