pub struct Permissions {
pub policy: Policy,
pub allow: Vec<String>,
pub ask: Vec<String>,
pub deny: Vec<String>,
}Fields§
§policy: Policy§allow: Vec<String>§ask: Vec<String>§deny: Vec<String>Implementations§
Source§impl Permissions
impl Permissions
pub fn none() -> Self
pub fn all() -> Self
pub fn ask_all() -> Self
pub fn check(&self, operation: &str, resource: Option<&str>) -> PermissionCheck
pub fn check_fs_read(&self, path: &str) -> PermissionCheck
pub fn check_fs_write(&self, path: &str) -> PermissionCheck
pub fn check_fs_delete(&self, path: &str) -> PermissionCheck
pub fn check_http(&self, url: &str) -> PermissionCheck
pub fn check_ws(&self, url: &str) -> PermissionCheck
pub fn check_process_run(&self, binary: &str) -> PermissionCheck
pub fn check_process_shell(&self) -> PermissionCheck
pub fn check_env_read(&self, var: &str) -> PermissionCheck
pub fn check_env_write(&self) -> PermissionCheck
Trait Implementations§
Source§impl Clone for Permissions
impl Clone for Permissions
Source§fn clone(&self) -> Permissions
fn clone(&self) -> Permissions
Returns a duplicate 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 Debug for Permissions
impl Debug for Permissions
Source§impl Default for Permissions
impl Default for Permissions
Source§fn default() -> Permissions
fn default() -> Permissions
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Permissions
impl<'de> Deserialize<'de> for Permissions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Permissions
impl RefUnwindSafe for Permissions
impl Send for Permissions
impl Sync for Permissions
impl Unpin for Permissions
impl UnwindSafe for Permissions
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