pub struct QueryBuilder<'a, C: QueryClient> { /* private fields */ }Expand description
Builder for constructing and executing queries.
Implementations§
Source§impl<'a, C: QueryClient> QueryBuilder<'a, C>
impl<'a, C: QueryClient> QueryBuilder<'a, C>
Sourcepub fn by_correlation_id(self, id: impl Into<String>) -> Self
pub fn by_correlation_id(self, id: impl Into<String>) -> Self
Query by correlation ID instead of root.
Sourcepub fn edition(self, edition: impl Into<String>) -> Self
pub fn edition(self, edition: impl Into<String>) -> Self
Query events from a specific edition (diverged timeline).
Sourcepub fn range_to(self, lower: u32, upper: u32) -> Self
pub fn range_to(self, lower: u32, upper: u32) -> Self
Query a range of sequences with upper bound (inclusive).
Sourcepub fn as_of_sequence(self, seq: u32) -> Self
pub fn as_of_sequence(self, seq: u32) -> Self
Query state as of a specific sequence number.
Sourcepub fn as_of_time(self, rfc3339: &str) -> Result<Self>
pub fn as_of_time(self, rfc3339: &str) -> Result<Self>
Query state as of a specific timestamp (RFC3339 format).
Sourcepub async fn get_events(self) -> Result<EventBook>
pub async fn get_events(self) -> Result<EventBook>
Execute the query and return the EventBook.
Auto Trait Implementations§
impl<'a, C> Freeze for QueryBuilder<'a, C>
impl<'a, C> RefUnwindSafe for QueryBuilder<'a, C>where
C: RefUnwindSafe,
impl<'a, C> Send for QueryBuilder<'a, C>
impl<'a, C> Sync for QueryBuilder<'a, C>
impl<'a, C> Unpin for QueryBuilder<'a, C>
impl<'a, C> UnsafeUnpin for QueryBuilder<'a, C>
impl<'a, C> UnwindSafe for QueryBuilder<'a, C>where
C: RefUnwindSafe,
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request