pub struct ScopeRegistry { /* private fields */ }Expand description
Definition registry that rejects duplicate identifiers and unknown client requests.
Implementations§
Source§impl ScopeRegistry
impl ScopeRegistry
Sourcepub fn register(
&mut self,
resolver: Arc<dyn ScopeResolver>,
) -> Result<(), ScopeError>
pub fn register( &mut self, resolver: Arc<dyn ScopeResolver>, ) -> Result<(), ScopeError>
Registers one definition.
§Errors
Returns ScopeError::DuplicateDefinition instead of silently replacing policy.
Sourcepub async fn resolve(
&self,
principal: ScopePrincipal,
request: &ScopeRequest,
) -> Result<ResolvedScope, ScopeError>
pub async fn resolve( &self, principal: ScopePrincipal, request: &ScopeRequest, ) -> Result<ResolvedScope, ScopeError>
Resolves and validates a requested scope after authentication.
§Errors
Returns a typed request, lookup, authorization, or descriptor error.
Trait Implementations§
Source§impl Default for ScopeRegistry
impl Default for ScopeRegistry
Source§fn default() -> ScopeRegistry
fn default() -> ScopeRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ScopeRegistry
impl !UnwindSafe for ScopeRegistry
impl Freeze for ScopeRegistry
impl Send for ScopeRegistry
impl Sync for ScopeRegistry
impl Unpin for ScopeRegistry
impl UnsafeUnpin for ScopeRegistry
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