pub struct QueryRequest<Q> { /* private fields */ }Expand description
A complete query request with authentication
This is the type that crosses API boundaries. It bundles:
- The scoped query (with mandatory namespace)
- The auth scope (with capability token)
This makes it impossible to execute a query without proper auth.
Implementations§
Source§impl<Q> QueryRequest<Q>
impl<Q> QueryRequest<Q>
Sourcepub fn new(
query: ScopedQuery<Q>,
auth: Arc<AuthScope>,
) -> Result<Self, ScopeError>
pub fn new( query: ScopedQuery<Q>, auth: Arc<AuthScope>, ) -> Result<Self, ScopeError>
Create a new query request
§Validation
This validates the query scope against the auth scope at construction time.
Sourcepub fn query(&self) -> &ScopedQuery<Q>
pub fn query(&self) -> &ScopedQuery<Q>
Get the scoped query
Sourcepub fn effective_filter(&self) -> FilterIR
pub fn effective_filter(&self) -> FilterIR
Compute the complete effective filter
This combines:
- Auth scope constraints (mandatory)
- Namespace scope constraints (mandatory)
- User-provided filters (optional)
Sourcepub fn namespace_scope(&self) -> &NamespaceScope
pub fn namespace_scope(&self) -> &NamespaceScope
Get the namespace scope
Trait Implementations§
Source§impl<Q: Clone> Clone for QueryRequest<Q>
impl<Q: Clone> Clone for QueryRequest<Q>
Source§fn clone(&self) -> QueryRequest<Q>
fn clone(&self) -> QueryRequest<Q>
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 moreAuto Trait Implementations§
impl<Q> Freeze for QueryRequest<Q>where
Q: Freeze,
impl<Q> RefUnwindSafe for QueryRequest<Q>where
Q: RefUnwindSafe,
impl<Q> Send for QueryRequest<Q>where
Q: Send,
impl<Q> Sync for QueryRequest<Q>where
Q: Sync,
impl<Q> Unpin for QueryRequest<Q>where
Q: Unpin,
impl<Q> UnsafeUnpin for QueryRequest<Q>where
Q: UnsafeUnpin,
impl<Q> UnwindSafe for QueryRequest<Q>where
Q: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more