pub struct AuthGuard { /* private fields */ }Expand description
Authorization guard
Implementations§
Source§impl AuthGuard
impl AuthGuard
pub fn new() -> Self
Sourcepub fn require_write_code(self) -> Self
pub fn require_write_code(self) -> Self
Require write code capability
Sourcepub fn require_execute_commands(self) -> Self
pub fn require_execute_commands(self) -> Self
Require execute commands capability
Sourcepub fn require_coordination(self) -> Self
pub fn require_coordination(self) -> Self
Require coordination capability
Sourcepub async fn check(
&self,
auth_service: &AuthService,
token: &str,
) -> Result<(), UbiquityError>
pub async fn check( &self, auth_service: &AuthService, token: &str, ) -> Result<(), UbiquityError>
Check if token meets all requirements
Auto Trait Implementations§
impl !RefUnwindSafe for AuthGuard
impl !UnwindSafe for AuthGuard
impl Freeze for AuthGuard
impl Send for AuthGuard
impl Sync for AuthGuard
impl Unpin for AuthGuard
impl UnsafeUnpin for AuthGuard
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