pub struct UnaryPermission<TAllowDesc: AllowDescriptor, TDenyDesc: DenyDescriptor> { /* private fields */ }Implementations§
Source§impl<TAllowDesc: AllowDescriptor<DenyDesc = TDenyDesc>, TDenyDesc: DenyDescriptor> UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc: AllowDescriptor<DenyDesc = TDenyDesc>, TDenyDesc: DenyDescriptor> UnaryPermission<TAllowDesc, TDenyDesc>
pub fn allow_all() -> Self
pub fn is_allow_all(&self) -> bool
pub fn check_all_api( &mut self, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<ReadDescriptor, ReadDescriptor>
impl UnaryPermission<ReadDescriptor, ReadDescriptor>
pub fn query(&self, desc: Option<&ReadQueryDescriptor<'_>>) -> PermissionState
pub fn request( &mut self, path: Option<&ReadQueryDescriptor<'_>>, ) -> PermissionState
pub fn revoke( &mut self, desc: Option<&ReadQueryDescriptor<'_>>, ) -> PermissionState
pub fn check( &mut self, desc: &ReadQueryDescriptor<'_>, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_partial( &mut self, desc: &ReadQueryDescriptor<'_>, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_all( &mut self, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<WriteDescriptor, WriteDescriptor>
impl UnaryPermission<WriteDescriptor, WriteDescriptor>
pub fn query(&self, path: Option<&WriteQueryDescriptor<'_>>) -> PermissionState
pub fn request( &mut self, path: Option<&WriteQueryDescriptor<'_>>, ) -> PermissionState
pub fn revoke( &mut self, path: Option<&WriteQueryDescriptor<'_>>, ) -> PermissionState
pub fn check( &mut self, path: &WriteQueryDescriptor<'_>, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_partial( &mut self, path: &WriteQueryDescriptor<'_>, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_all( &mut self, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<NetDescriptor, NetDescriptor>
impl UnaryPermission<NetDescriptor, NetDescriptor>
pub fn query(&self, host: Option<&NetDescriptor>) -> PermissionState
pub fn request(&mut self, host: Option<&NetDescriptor>) -> PermissionState
pub fn revoke(&mut self, host: Option<&NetDescriptor>) -> PermissionState
pub fn check( &mut self, host: &NetDescriptor, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_all(&mut self) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<ImportDescriptor, ImportDescriptor>
impl UnaryPermission<ImportDescriptor, ImportDescriptor>
pub fn query(&self, host: Option<&ImportDescriptor>) -> PermissionState
pub fn request(&mut self, host: Option<&ImportDescriptor>) -> PermissionState
pub fn revoke(&mut self, host: Option<&ImportDescriptor>) -> PermissionState
pub fn check( &mut self, host: &ImportDescriptor, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_all(&mut self) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<EnvDescriptor, EnvDescriptor>
impl UnaryPermission<EnvDescriptor, EnvDescriptor>
pub fn query(&self, env: Option<&str>) -> PermissionState
pub fn request(&mut self, env: Option<&str>) -> PermissionState
pub fn revoke(&mut self, env: Option<&str>) -> PermissionState
pub fn check( &mut self, env: &str, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_all(&mut self) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<SysDescriptor, SysDescriptor>
impl UnaryPermission<SysDescriptor, SysDescriptor>
pub fn query(&self, kind: Option<&SysDescriptor>) -> PermissionState
pub fn request(&mut self, kind: Option<&SysDescriptor>) -> PermissionState
pub fn revoke(&mut self, kind: Option<&SysDescriptor>) -> PermissionState
pub fn check( &mut self, kind: &SysDescriptor, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_all(&mut self) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<AllowRunDescriptor, DenyRunDescriptor>
impl UnaryPermission<AllowRunDescriptor, DenyRunDescriptor>
pub fn query(&self, cmd: Option<&RunQueryDescriptor<'_>>) -> PermissionState
pub fn request( &mut self, cmd: Option<&RunQueryDescriptor<'_>>, ) -> PermissionState
pub fn revoke( &mut self, cmd: Option<&RunQueryDescriptor<'_>>, ) -> PermissionState
pub fn check( &mut self, cmd: &RunQueryDescriptor<'_>, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_all( &mut self, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
Source§impl UnaryPermission<FfiDescriptor, FfiDescriptor>
impl UnaryPermission<FfiDescriptor, FfiDescriptor>
pub fn query(&self, path: Option<&FfiQueryDescriptor<'_>>) -> PermissionState
pub fn request( &mut self, path: Option<&FfiQueryDescriptor<'_>>, ) -> PermissionState
pub fn revoke( &mut self, path: Option<&FfiQueryDescriptor<'_>>, ) -> PermissionState
pub fn check( &mut self, path: &FfiQueryDescriptor<'_>, api_name: Option<&str>, ) -> Result<(), PermissionDeniedError>
pub fn check_partial( &mut self, path: Option<&FfiQueryDescriptor<'_>>, ) -> Result<(), PermissionDeniedError>
pub fn check_all(&mut self) -> Result<(), PermissionDeniedError>
Trait Implementations§
Source§impl<TAllowDesc: AllowDescriptor, TDenyDesc: DenyDescriptor> Clone for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc: AllowDescriptor, TDenyDesc: DenyDescriptor> Clone for UnaryPermission<TAllowDesc, TDenyDesc>
Source§impl<TAllowDesc: Debug + AllowDescriptor, TDenyDesc: Debug + DenyDescriptor> Debug for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc: Debug + AllowDescriptor, TDenyDesc: Debug + DenyDescriptor> Debug for UnaryPermission<TAllowDesc, TDenyDesc>
Source§impl<TAllowDesc: AllowDescriptor, TDenyDesc: DenyDescriptor> Default for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc: AllowDescriptor, TDenyDesc: DenyDescriptor> Default for UnaryPermission<TAllowDesc, TDenyDesc>
Source§impl<TAllowDesc: PartialEq + AllowDescriptor, TDenyDesc: PartialEq + DenyDescriptor> PartialEq for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc: PartialEq + AllowDescriptor, TDenyDesc: PartialEq + DenyDescriptor> PartialEq for UnaryPermission<TAllowDesc, TDenyDesc>
Source§fn eq(&self, other: &UnaryPermission<TAllowDesc, TDenyDesc>) -> bool
fn eq(&self, other: &UnaryPermission<TAllowDesc, TDenyDesc>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<TAllowDesc: Eq + AllowDescriptor, TDenyDesc: Eq + DenyDescriptor> Eq for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc: AllowDescriptor, TDenyDesc: DenyDescriptor> StructuralPartialEq for UnaryPermission<TAllowDesc, TDenyDesc>
Auto Trait Implementations§
impl<TAllowDesc, TDenyDesc> Freeze for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc, TDenyDesc> RefUnwindSafe for UnaryPermission<TAllowDesc, TDenyDesc>where
TAllowDesc: RefUnwindSafe,
TDenyDesc: RefUnwindSafe,
impl<TAllowDesc, TDenyDesc> Send for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc, TDenyDesc> Sync for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc, TDenyDesc> Unpin for UnaryPermission<TAllowDesc, TDenyDesc>
impl<TAllowDesc, TDenyDesc> UnwindSafe for UnaryPermission<TAllowDesc, TDenyDesc>where
TAllowDesc: UnwindSafe,
TDenyDesc: 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