pub struct SandboxBuilder { /* private fields */ }Expand description
Sandbox builder
Implementations§
Source§impl SandboxBuilder
impl SandboxBuilder
Sourcepub fn memory_limit(self, limit: usize) -> Self
pub fn memory_limit(self, limit: usize) -> Self
Set memory limit
Sourcepub fn fuel_limit(self, limit: u64) -> Self
pub fn fuel_limit(self, limit: u64) -> Self
Set fuel limit
Sourcepub fn grant(self, permission: Permission) -> Self
pub fn grant(self, permission: Permission) -> Self
Grant permission
Sourcepub fn allow_host(self, host: String) -> Self
pub fn allow_host(self, host: String) -> Self
Allow host
Sourcepub fn allow_path(self, path: PathBuf) -> Self
pub fn allow_path(self, path: PathBuf) -> Self
Allow path
Sourcepub fn enable_network(self) -> Self
pub fn enable_network(self) -> Self
Enable network
Sourcepub fn enable_filesystem(self) -> Self
pub fn enable_filesystem(self) -> Self
Enable filesystem
Sourcepub fn build(self) -> PluginSandbox
pub fn build(self) -> PluginSandbox
Build the sandbox
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SandboxBuilder
impl RefUnwindSafe for SandboxBuilder
impl Send for SandboxBuilder
impl Sync for SandboxBuilder
impl Unpin for SandboxBuilder
impl UnsafeUnpin for SandboxBuilder
impl UnwindSafe for SandboxBuilder
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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