pub struct QueryContext {
pub tenant_id: Option<String>,
pub trace_id: Option<String>,
pub tags: BTreeMap<String, String>,
}Fields§
§tenant_id: Option<String>§trace_id: Option<String>Implementations§
Source§impl QueryContext
impl QueryContext
pub fn with_tenant_id(self, tenant_id: impl Into<String>) -> Self
pub fn with_tag(self, key: impl Into<String>, value: impl Into<String>) -> Self
pub fn with_correlation_id(self, correlation_id: impl Into<String>) -> Self
pub fn with_request_id(self, request_id: impl Into<String>) -> Self
pub fn with_timeout_ms(self, timeout_ms: u64) -> Self
pub fn with_retry_policy(self, policy: RetryPolicy) -> Self
pub fn correlation_id(&self) -> Option<&str>
pub fn request_id(&self) -> Option<&str>
pub fn timeout_ms(&self) -> Option<u64>
pub fn retry_policy_override(&self) -> Option<RetryPolicy>
Trait Implementations§
Source§impl Clone for QueryContext
impl Clone for QueryContext
Source§fn clone(&self) -> QueryContext
fn clone(&self) -> QueryContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 QueryContext
impl Debug for QueryContext
Source§impl Default for QueryContext
impl Default for QueryContext
Source§fn default() -> QueryContext
fn default() -> QueryContext
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for QueryContext
impl<'de> Deserialize<'de> for QueryContext
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 PartialEq for QueryContext
impl PartialEq for QueryContext
Source§fn eq(&self, other: &QueryContext) -> bool
fn eq(&self, other: &QueryContext) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for QueryContext
impl Serialize for QueryContext
impl StructuralPartialEq for QueryContext
Auto Trait Implementations§
impl Freeze for QueryContext
impl RefUnwindSafe for QueryContext
impl Send for QueryContext
impl Sync for QueryContext
impl Unpin for QueryContext
impl UnsafeUnpin for QueryContext
impl UnwindSafe for QueryContext
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