Struct actix_web_grants::permissions::AuthDetails
source · pub struct AuthDetails<T = String>where
T: PartialEq,{
pub permissions: Vec<T>,
}
Fields§
§permissions: Vec<T>
Implementations§
source§impl<T> AuthDetails<T>
impl<T> AuthDetails<T>
pub fn new(permissions: Vec<T>) -> AuthDetails<T>
Trait Implementations§
source§impl<T> Clone for AuthDetails<T>
impl<T> Clone for AuthDetails<T>
source§fn clone(&self) -> AuthDetails<T>
fn clone(&self) -> AuthDetails<T>
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<T: PartialEq + Clone + 'static> FromRequest for AuthDetails<T>
impl<T: PartialEq + Clone + 'static> FromRequest for AuthDetails<T>
§type Future = Pin<Box<dyn Future<Output = Result<AuthDetails<T>, Error>>>>
type Future = Pin<Box<dyn Future<Output = Result<AuthDetails<T>, Error>>>>
Future that resolves to a
Self
. Read moresource§fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future
fn from_request(req: &HttpRequest, _payload: &mut Payload) -> Self::Future
Create a
Self
from request parts asynchronously.source§impl<T: PartialEq + Clone> PermissionsCheck<&T> for AuthDetails<T>
impl<T: PartialEq + Clone> PermissionsCheck<&T> for AuthDetails<T>
fn has_permission(&self, permission: &T) -> bool
fn has_permissions(&self, permissions: &[&T]) -> bool
fn has_any_permission(&self, permissions: &[&T]) -> bool
source§impl PermissionsCheck<&str> for AuthDetails
impl PermissionsCheck<&str> for AuthDetails
fn has_permission(&self, permission: &str) -> bool
fn has_permissions(&self, permissions: &[&str]) -> bool
fn has_any_permission(&self, permissions: &[&str]) -> bool
source§impl<T: PartialEq + Clone> RolesCheck<&T> for AuthDetails<T>
impl<T: PartialEq + Clone> RolesCheck<&T> for AuthDetails<T>
Auto Trait Implementations§
impl<T> Freeze for AuthDetails<T>
impl<T> RefUnwindSafe for AuthDetails<T>where
T: RefUnwindSafe,
impl<T> Send for AuthDetails<T>where
T: Send,
impl<T> Sync for AuthDetails<T>where
T: Sync,
impl<T> Unpin for AuthDetails<T>where
T: Unpin,
impl<T> UnwindSafe for AuthDetails<T>where
T: UnwindSafe,
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)