pub enum FsScope {
AllowedPaths(Vec<PathBuf>),
Scope {
allow: Vec<PathBuf>,
deny: Vec<PathBuf>,
require_literal_leading_dot: Option<bool>,
},
}
Expand description
Protocol 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
A complete scope configuration.
Fields
deny: Vec<PathBuf>
A list of paths that are not allowed by this scope.
This gets precedence over the Self::Scope::allow
list.
require_literal_leading_dot: Option<bool>
Whether or not paths that contain components that start with a .
will require that .
appears literally in the pattern; *
, ?
, **
,
or [...]
will not match. This is useful because such files are
conventionally considered hidden on Unix systems and it might be
desirable to skip them when listing files.
Defaults to true
on Unix systems and false
on Windows
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FsScope
impl<'de> Deserialize<'de> for FsScope
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>,
impl Eq for FsScope
impl StructuralPartialEq for FsScope
Auto Trait Implementations§
impl Freeze for FsScope
impl RefUnwindSafe for FsScope
impl Send for FsScope
impl Sync for FsScope
impl Unpin for FsScope
impl UnwindSafe for FsScope
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
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)
clone_to_uninit
)Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.