pub struct LogQuery {
pub service: Option<ServiceName>,
pub levels: Vec<Level>,
pub target: Option<TargetCategory>,
pub action: Option<ActionName>,
pub request_id: Option<CorrelationId>,
pub correlation_id: Option<CorrelationId>,
pub since: Option<Timestamp>,
pub until: Option<Timestamp>,
pub field_matches: Vec<LogFieldMatch>,
pub limit: Option<usize>,
pub order: LogOrder,
}Expand description
Shared historical/follow query contract used by the logging reader/runtime layers.
Fields§
§service: Option<ServiceName>Optional service filter.
levels: Vec<Level>Allowed severity levels; empty means any level.
target: Option<TargetCategory>Optional target/category filter.
action: Option<ActionName>Optional action filter.
request_id: Option<CorrelationId>Optional request identifier filter.
correlation_id: Option<CorrelationId>Optional correlation identifier filter.
since: Option<Timestamp>Optional inclusive lower timestamp bound.
until: Option<Timestamp>Optional inclusive upper timestamp bound.
field_matches: Vec<LogFieldMatch>Exact-match field predicates.
limit: Option<usize>Optional maximum number of returned events.
order: LogOrderResult ordering.
Implementations§
Source§impl LogQuery
impl LogQuery
Sourcepub fn validate(&self) -> Result<(), QueryError>
pub fn validate(&self) -> Result<(), QueryError>
Validates the frozen shared query semantics before runtime execution.
§Errors
Returns QueryError::InvalidQuery when the query violates the shared
contract for limit or timestamp-range semantics.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LogQuery
impl<'de> Deserialize<'de> for LogQuery
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LogQuery, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for LogQuery
impl Serialize for LogQuery
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for LogQuery
Auto Trait Implementations§
impl Freeze for LogQuery
impl RefUnwindSafe for LogQuery
impl Send for LogQuery
impl Sync for LogQuery
impl Unpin for LogQuery
impl UnsafeUnpin for LogQuery
impl UnwindSafe for LogQuery
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