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