Struct carapax::access::InMemoryAccessPolicy
source · pub struct InMemoryAccessPolicy { /* private fields */ }
Available on crate feature
access
only.Expand description
In-memory access policy implementation.
If there are no rules found, AccessPolicy::is_granted
will return false
.
You can use AccessRule::allow_all
as the last rule to modify this behavior.
Trait Implementations§
source§impl AccessPolicy for InMemoryAccessPolicy
impl AccessPolicy for InMemoryAccessPolicy
§type Error = Infallible
type Error = Infallible
An error that may be returned by the
Self::is_granted
method.§type Future = Ready<Result<bool, <InMemoryAccessPolicy as AccessPolicy>::Error>>
type Future = Ready<Result<bool, <InMemoryAccessPolicy as AccessPolicy>::Error>>
A future representing the result of the
Self::is_granted
method.source§fn is_granted(&self, input: HandlerInput) -> Self::Future
fn is_granted(&self, input: HandlerInput) -> Self::Future
Determines if access is granted for the given input. Read more
source§impl Clone for InMemoryAccessPolicy
impl Clone for InMemoryAccessPolicy
source§fn clone(&self) -> InMemoryAccessPolicy
fn clone(&self) -> InMemoryAccessPolicy
Returns a copy 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 Default for InMemoryAccessPolicy
impl Default for InMemoryAccessPolicy
source§fn default() -> InMemoryAccessPolicy
fn default() -> InMemoryAccessPolicy
Returns the “default value” for a type. Read more
source§impl<T> From<T> for InMemoryAccessPolicywhere
T: IntoIterator<Item = AccessRule>,
impl<T> From<T> for InMemoryAccessPolicywhere
T: IntoIterator<Item = AccessRule>,
Auto Trait Implementations§
impl Freeze for InMemoryAccessPolicy
impl RefUnwindSafe for InMemoryAccessPolicy
impl Send for InMemoryAccessPolicy
impl Sync for InMemoryAccessPolicy
impl Unpin for InMemoryAccessPolicy
impl UnwindSafe for InMemoryAccessPolicy
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> 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