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
sourceimpl 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
sourceimpl Clone for FsAllowlistScope
impl Clone for FsAllowlistScope
sourcefn clone(&self) -> FsAllowlistScope
fn clone(&self) -> FsAllowlistScope
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for FsAllowlistScope
impl Debug for FsAllowlistScope
sourceimpl Default for FsAllowlistScope
impl Default for FsAllowlistScope
sourceimpl<'de> Deserialize<'de> for FsAllowlistScope
impl<'de> Deserialize<'de> for FsAllowlistScope
sourcefn 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
sourceimpl PartialEq<FsAllowlistScope> for FsAllowlistScope
impl PartialEq<FsAllowlistScope> for FsAllowlistScope
sourcefn eq(&self, other: &FsAllowlistScope) -> bool
fn eq(&self, other: &FsAllowlistScope) -> bool
sourceimpl Serialize for FsAllowlistScope
impl Serialize for FsAllowlistScope
impl Eq for FsAllowlistScope
impl StructuralEq for FsAllowlistScope
impl StructuralPartialEq for FsAllowlistScope
Auto Trait Implementations
impl RefUnwindSafe for FsAllowlistScope
impl Send for FsAllowlistScope
impl Sync for FsAllowlistScope
impl Unpin for FsAllowlistScope
impl UnwindSafe for FsAllowlistScope
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more