pub struct PluginSandbox { /* private fields */ }Expand description
Plugin sandbox for secure execution
Implementations§
Source§impl PluginSandbox
impl PluginSandbox
Sourcepub fn new(security_level: SecurityLevel) -> Self
pub fn new(security_level: SecurityLevel) -> Self
Create new plugin sandbox
Sourcepub fn execute_safely(
&self,
plugin_name: &str,
css: &str,
config: &HashMap<String, Value>,
) -> Result<PluginResult, PluginError>
pub fn execute_safely( &self, plugin_name: &str, css: &str, config: &HashMap<String, Value>, ) -> Result<PluginResult, PluginError>
Execute plugin in sandbox
Auto Trait Implementations§
impl Freeze for PluginSandbox
impl RefUnwindSafe for PluginSandbox
impl Send for PluginSandbox
impl Sync for PluginSandbox
impl Unpin for PluginSandbox
impl UnwindSafe for PluginSandbox
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more