Enum tauri_utils::config::FsAllowlistScope
source · pub enum FsAllowlistScope {
AllowedPaths(Vec<PathBuf>),
Scope {
allow: Vec<PathBuf>,
deny: Vec<PathBuf>,
},
}Expand description
Filesystem scope definition. It is a list of glob patterns that restrict the API access from the webview.
Each pattern can start with a variable that resolves to a system base directory.
The variables are: $AUDIO, $CACHE, $CONFIG, $DATA, $LOCALDATA, $DESKTOP,
$DOCUMENT, $DOWNLOAD, $EXE, $FONT, $HOME, $PICTURE, $PUBLIC, $RUNTIME,
$TEMPLATE, $VIDEO, $RESOURCE, $APP, $LOG, $TEMP, $APPCONFIG, $APPDATA,
$APPLOCALDATA, $APPCACHE, $APPLOG.
Variants§
AllowedPaths(Vec<PathBuf>)
A list of paths that are allowed by this scope.
Scope
Fields
§
deny: Vec<PathBuf>A list of paths that are not allowed by this scope.
This gets precedence over the Self::Scope::allow list.
A complete scope configuration.
Implementations§
source§impl FsAllowlistScope
impl FsAllowlistScope
sourcepub fn allowed_paths(&self) -> &Vec<PathBuf>
pub fn allowed_paths(&self) -> &Vec<PathBuf>
The list of allowed paths.
sourcepub fn forbidden_paths(&self) -> Option<&Vec<PathBuf>>
pub fn forbidden_paths(&self) -> Option<&Vec<PathBuf>>
The list of forbidden paths.
Trait Implementations§
source§impl Clone for FsAllowlistScope
impl Clone for FsAllowlistScope
source§fn clone(&self) -> FsAllowlistScope
fn clone(&self) -> FsAllowlistScope
Returns a copy 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 FsAllowlistScope
impl Debug for FsAllowlistScope
source§impl Default for FsAllowlistScope
impl Default for FsAllowlistScope
source§impl<'de> Deserialize<'de> for FsAllowlistScope
impl<'de> Deserialize<'de> for FsAllowlistScope
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<FsAllowlistScope> for FsAllowlistScope
impl PartialEq<FsAllowlistScope> for FsAllowlistScope
source§fn eq(&self, other: &FsAllowlistScope) -> bool
fn eq(&self, other: &FsAllowlistScope) -> bool
This method tests for
self and other values to be equal, and is used
by ==.