pub trait Query:
Send
+ Sync
+ Clone
+ Debug {
type Result: Send + Sync + Clone;
// Required methods
fn query_id(&self) -> Uuid;
fn validate(&self) -> Result<()>;
fn cache_key(&self) -> Option<String>;
fn timeout_ms(&self) -> Option<u64>;
}Expand description
Base trait for all queries in the CQRS system
Required Associated Types§
Required Methods§
Sourcefn timeout_ms(&self) -> Option<u64>
fn timeout_ms(&self) -> Option<u64>
Get query timeout in milliseconds
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.