pub struct HistoryQuery {
pub device_id: Option<String>,
pub since: Option<OffsetDateTime>,
pub until: Option<OffsetDateTime>,
pub limit: Option<u32>,
pub offset: Option<u32>,
pub newest_first: bool,
}Expand description
Query builder for history records.
Fields§
§device_id: Option<String>Filter by device ID.
since: Option<OffsetDateTime>Filter records after this time.
until: Option<OffsetDateTime>Filter records before this time.
limit: Option<u32>Maximum number of results.
offset: Option<u32>Offset for pagination.
newest_first: boolOrder by timestamp descending (newest first).
Implementations§
Source§impl HistoryQuery
impl HistoryQuery
Sourcepub fn since(self, time: OffsetDateTime) -> Self
pub fn since(self, time: OffsetDateTime) -> Self
Filter records after this time.
Sourcepub fn until(self, time: OffsetDateTime) -> Self
pub fn until(self, time: OffsetDateTime) -> Self
Filter records before this time.
Sourcepub fn oldest_first(self) -> Self
pub fn oldest_first(self) -> Self
Order by oldest first.
Trait Implementations§
Source§impl Clone for HistoryQuery
impl Clone for HistoryQuery
Source§fn clone(&self) -> HistoryQuery
fn clone(&self) -> HistoryQuery
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 HistoryQuery
impl Debug for HistoryQuery
Source§impl Default for HistoryQuery
impl Default for HistoryQuery
Source§fn default() -> HistoryQuery
fn default() -> HistoryQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HistoryQuery
impl RefUnwindSafe for HistoryQuery
impl Send for HistoryQuery
impl Sync for HistoryQuery
impl Unpin for HistoryQuery
impl UnwindSafe for HistoryQuery
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