pub trait RequestView {
// Required method
fn query(&self) -> Option<&str>;
// Provided methods
fn is_read_only(&self) -> bool { ... }
fn database(&self) -> Option<&str> { ... }
fn client_id(&self) -> Option<&str> { ... }
fn tenant_id(&self) -> Option<&str> { ... }
}Expand description
Read-only view of per-request metadata.
Every method returns Option where appropriate so implementations can
return None when the underlying carrier doesn’t track that field.
Consumers that need a field unconditionally should guard with
.ok_or(Error::…) at the call site.
Required Methods§
Provided Methods§
Sourcefn is_read_only(&self) -> bool
fn is_read_only(&self) -> bool
Whether the query is a read-only operation (SELECT / SHOW / …).
Defaults to false for safety — an implementation that cannot
classify a query should leave the default.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl RequestView for QueryContext
Available on crate feature
wasm-plugins only.