pub struct AuthorizerSet { /* private fields */ }Expand description
A set of IDynamicAuthorizer instances collected from the DI container.
Created automatically in HostBuilder::build() when one or more
IDynamicAuthorizer implementations are registered. If none are registered,
this is None and no dynamic authorization checks run.
Implementations§
Source§impl AuthorizerSet
impl AuthorizerSet
Sourcepub fn new(authorizers: Vec<Arc<dyn IDynamicAuthorizer>>) -> AuthorizerSet
pub fn new(authorizers: Vec<Arc<dyn IDynamicAuthorizer>>) -> AuthorizerSet
Create a new set from a vector of authorizers.
Run all registered authorizers in sequence.
Returns Ok(()) if ALL authorizers pass. Returns the first Err if any denies.
1.1 compatibility — new code should call
AuthorizerSet::authorize_with_rules instead, which passes the
endpoint’s declared rules. This method is equivalent to that call with an
empty declaration.
Run all registered authorizers in sequence, handing them the matched
endpoint’s #[authorize] declaration.
Returns Ok(()) if ALL authorizers pass. Returns the first Err if any denies.
Trait Implementations§
Source§impl Clone for AuthorizerSet
impl Clone for AuthorizerSet
Source§fn clone(&self) -> AuthorizerSet
fn clone(&self) -> AuthorizerSet
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more