pub enum NamespaceScope {
Single(Namespace),
Multiple(Vec<Namespace>),
}Expand description
Scope for a query - either single namespace or explicitly multiple
Variants§
Single(Namespace)
Query within a single namespace (most common)
Multiple(Vec<Namespace>)
Query across multiple namespaces (requires explicit authorization)
Implementations§
Source§impl NamespaceScope
impl NamespaceScope
Sourcepub fn multiple(namespaces: Vec<Namespace>) -> Result<Self, NamespaceError>
pub fn multiple(namespaces: Vec<Namespace>) -> Result<Self, NamespaceError>
Create a multi-namespace scope
Sourcepub fn namespaces(&self) -> Vec<&Namespace>
pub fn namespaces(&self) -> Vec<&Namespace>
Get all namespaces in this scope
Sourcepub fn validate_against(&self, auth: &AuthScope) -> Result<(), ScopeError>
pub fn validate_against(&self, auth: &AuthScope) -> Result<(), ScopeError>
Validate against an auth scope
Sourcepub fn to_filter_ir(&self) -> FilterIR
pub fn to_filter_ir(&self) -> FilterIR
Convert to filter IR clauses
Trait Implementations§
Source§impl Clone for NamespaceScope
impl Clone for NamespaceScope
Source§fn clone(&self) -> NamespaceScope
fn clone(&self) -> NamespaceScope
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 moreSource§impl Debug for NamespaceScope
impl Debug for NamespaceScope
Source§impl<'de> Deserialize<'de> for NamespaceScope
impl<'de> Deserialize<'de> for NamespaceScope
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 Display for NamespaceScope
impl Display for NamespaceScope
Source§impl PartialEq for NamespaceScope
impl PartialEq for NamespaceScope
Source§impl Serialize for NamespaceScope
impl Serialize for NamespaceScope
impl StructuralPartialEq for NamespaceScope
Auto Trait Implementations§
impl Freeze for NamespaceScope
impl RefUnwindSafe for NamespaceScope
impl Send for NamespaceScope
impl Sync for NamespaceScope
impl Unpin for NamespaceScope
impl UnsafeUnpin for NamespaceScope
impl UnwindSafe for NamespaceScope
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more