pub struct AccessDecisionManager { /* private fields */ }Expand description
Collects voters and applies an affirmative strategy (any grant wins; any deny without grant fails).
Implementations§
Source§impl AccessDecisionManager
impl AccessDecisionManager
Sourcepub fn new() -> AccessDecisionManager
pub fn new() -> AccessDecisionManager
Empty manager (always denies when no grant).
Sourcepub fn decide(
&self,
token: &dyn TokenInterface,
subject: &str,
) -> Result<(), SecurityError>
pub fn decide( &self, token: &dyn TokenInterface, subject: &str, ) -> Result<(), SecurityError>
Returns Ok(()) when access is granted.
§Errors
Returns SecurityError::AccessDenied when no voter grants (or a deny stands alone).
Trait Implementations§
Source§impl Default for AccessDecisionManager
impl Default for AccessDecisionManager
Source§fn default() -> AccessDecisionManager
fn default() -> AccessDecisionManager
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for AccessDecisionManager
impl !UnwindSafe for AccessDecisionManager
impl Forget for AccessDecisionManager
impl Freeze for AccessDecisionManager
impl Move for AccessDecisionManager
impl Send for AccessDecisionManager
impl Sync for AccessDecisionManager
impl Unpin for AccessDecisionManager
impl UnsafeUnpin for AccessDecisionManager
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
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> SerializableKey for T
impl<T> SerializableKey for T
Source§impl<T> StorageAccess<T> for T
impl<T> StorageAccess<T> for T
Source§fn as_borrowed(&self) -> &T
fn as_borrowed(&self) -> &T
Borrows the value.
Source§fn into_taken(self) -> T
fn into_taken(self) -> T
Takes the value.