pub enum PermissionDecl {
Network {
host: String,
reason: String,
},
Files {
path: String,
write: bool,
reason: String,
},
Launch {
program: String,
reason: String,
},
Credentials {
reason: String,
},
}Expand description
One permission, owned. Mirrors Permission.
Tagged by kind with the target as a separate field, rather than one string per variant, so a consumer that does not recognise a future kind can still show the user something — the reason, at least — instead of dropping a permission silently. Dropping one is the failure that matters here: it would understate what the addon asked for.
Variants§
Network
Reach a host over the network.
Files
Read or write files under a path.
Launch
Start another program.
Credentials
Keep credentials in the OS credential store. The enforced one.
Trait Implementations§
Source§impl Clone for PermissionDecl
impl Clone for PermissionDecl
Source§fn clone(&self) -> PermissionDecl
fn clone(&self) -> PermissionDecl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PermissionDecl
impl Debug for PermissionDecl
Source§impl<'de> Deserialize<'de> for PermissionDecl
impl<'de> Deserialize<'de> for PermissionDecl
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
Source§impl PartialEq for PermissionDecl
impl PartialEq for PermissionDecl
Source§fn eq(&self, other: &PermissionDecl) -> bool
fn eq(&self, other: &PermissionDecl) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PermissionDecl
impl Serialize for PermissionDecl
impl Eq for PermissionDecl
impl StructuralPartialEq for PermissionDecl
Auto Trait Implementations§
impl Freeze for PermissionDecl
impl RefUnwindSafe for PermissionDecl
impl Send for PermissionDecl
impl Sync for PermissionDecl
impl Unpin for PermissionDecl
impl UnsafeUnpin for PermissionDecl
impl UnwindSafe for PermissionDecl
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