pub struct EventQuery {
pub session_id: Option<SessionId>,
pub branch_id: Option<BranchId>,
pub after_seq: Option<SeqNo>,
pub before_seq: Option<SeqNo>,
pub limit: Option<usize>,
pub metadata_filters: Option<Vec<(String, String)>>,
pub kind_filter: Option<Vec<String>>,
}Expand description
Query parameters for reading events.
Fields§
§session_id: Option<SessionId>§branch_id: Option<BranchId>§after_seq: Option<SeqNo>§before_seq: Option<SeqNo>§limit: Option<usize>§metadata_filters: Option<Vec<(String, String)>>Filter events by metadata key-value pairs (all must match).
kind_filter: Option<Vec<String>>Filter by event kind discriminant name (e.g. “HiveArtifactShared”).
Implementations§
Source§impl EventQuery
impl EventQuery
pub fn new() -> Self
pub fn session(self, id: SessionId) -> Self
pub fn branch(self, id: BranchId) -> Self
pub fn after(self, seq: SeqNo) -> Self
pub fn before(self, seq: SeqNo) -> Self
pub fn limit(self, n: usize) -> Self
Source§impl EventQuery
impl EventQuery
Sourcepub fn matches_filters(&self, envelope: &EventEnvelope) -> bool
pub fn matches_filters(&self, envelope: &EventEnvelope) -> bool
Check if an event envelope matches the metadata and kind filters. Used for post-deserialization filtering in journal implementations.
Trait Implementations§
Source§impl Clone for EventQuery
impl Clone for EventQuery
Source§fn clone(&self) -> EventQuery
fn clone(&self) -> EventQuery
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 EventQuery
impl Debug for EventQuery
Source§impl Default for EventQuery
impl Default for EventQuery
Source§fn default() -> EventQuery
fn default() -> EventQuery
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for EventQuery
impl RefUnwindSafe for EventQuery
impl Send for EventQuery
impl Sync for EventQuery
impl Unpin for EventQuery
impl UnsafeUnpin for EventQuery
impl UnwindSafe for EventQuery
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