pub struct HistoryQuery {
pub print_id: PrintId,
pub kinds: Vec<EventKind>,
pub since: Option<Timestamp>,
pub until: Option<Timestamp>,
pub limit: Option<u32>,
}Expand description
Which of a print’s events to read.
An empty kinds means every kind rather than no kinds, and an absent
limit means DEFAULT_HISTORY_WINDOW.
Fields§
§print_id: PrintIdThe print to read the history of.
kinds: Vec<EventKind>The kinds to read; empty means every kind.
since: Option<Timestamp>The earliest instant to read from, inclusive.
until: Option<Timestamp>The latest instant to read to, inclusive.
limit: Option<u32>How many events to answer; absent means DEFAULT_HISTORY_WINDOW.
Implementations§
Source§impl HistoryQuery
impl HistoryQuery
Sourcepub fn resolved_limit(&self) -> Result<u32, StoreError>
pub fn resolved_limit(&self) -> Result<u32, StoreError>
The limit this query resolves to.
§Errors
Returns StoreError::LimitRefused when the limit asked for is above
MAX_HISTORY_LIMIT.
Trait Implementations§
Source§impl Clone for HistoryQuery
impl Clone for HistoryQuery
Source§impl Debug for HistoryQuery
impl Debug for HistoryQuery
Source§impl<'de> Deserialize<'de> for HistoryQuery
impl<'de> Deserialize<'de> for HistoryQuery
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for HistoryQuery
impl JsonSchema for HistoryQuery
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for HistoryQuery
impl PartialEq for HistoryQuery
Source§impl Serialize for HistoryQuery
impl Serialize for HistoryQuery
impl StructuralPartialEq for HistoryQuery
Auto Trait Implementations§
impl Forget for HistoryQuery
impl Freeze for HistoryQuery
impl RefUnwindSafe for HistoryQuery
impl Send for HistoryQuery
impl Sync for HistoryQuery
impl Unpin for HistoryQuery
impl UnsafeUnpin 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