pub struct Scopes {
pub allow: Option<Vec<Value>>,
pub deny: Option<Vec<Value>>,
}
Expand description
An argument for fine grained behavior control of Tauri commands.
It can be of any serde serializable type and is used to allow or prevent certain actions inside a Tauri command. The configured scope is passed to the command and will be enforced by the command implementation.
§Example
{
"allow": [{ "path": "$HOME/**" }],
"deny": [{ "path": "$HOME/secret.txt" }]
}
Fields§
§allow: Option<Vec<Value>>
Data that defines what is allowed by the scope.
deny: Option<Vec<Value>>
Data that defines what is denied by the scope. This should be prioritized by validation logic.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Scopes
impl<'de> Deserialize<'de> for Scopes
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
impl StructuralPartialEq for Scopes
Auto Trait Implementations§
impl Freeze for Scopes
impl RefUnwindSafe for Scopes
impl Send for Scopes
impl Sync for Scopes
impl Unpin for Scopes
impl UnwindSafe for Scopes
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)