pub struct SandboxConfig { /* private fields */ }Expand description
Builder for sandbox configuration.
All fields are Copy, so SandboxConfig is cheap to clone and pass by
value. The default configuration uses IsolationLevel::None with a
16-element log channel.
Implementations§
Source§impl SandboxConfig
impl SandboxConfig
Sourcepub fn with_isolation_level(self, level: IsolationLevel) -> Self
pub fn with_isolation_level(self, level: IsolationLevel) -> Self
Set the isolation level.
Sourcepub fn with_log_channel_capacity(self, capacity: usize) -> Self
pub fn with_log_channel_capacity(self, capacity: usize) -> Self
Set the log channel capacity (number of buffered messages).
A capacity of 0 means log messages are dropped. Values above
u32::MAX are clamped when encoding on the wire.
Sourcepub fn isolation_level(self) -> IsolationLevel
pub fn isolation_level(self) -> IsolationLevel
The configured isolation level.
Sourcepub fn log_channel_capacity(self) -> usize
pub fn log_channel_capacity(self) -> usize
The configured log channel capacity.
Sourcepub fn is_platform_supported(self) -> bool
pub fn is_platform_supported(self) -> bool
Return true when the configured isolation level is supported on the
current platform.
Trait Implementations§
Source§impl Clone for SandboxConfig
impl Clone for SandboxConfig
Source§fn clone(&self) -> SandboxConfig
fn clone(&self) -> SandboxConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SandboxConfig
Source§impl Debug for SandboxConfig
impl Debug for SandboxConfig
Source§impl Default for SandboxConfig
impl Default for SandboxConfig
impl Eq for SandboxConfig
Source§impl Hash for SandboxConfig
impl Hash for SandboxConfig
Source§impl PartialEq for SandboxConfig
impl PartialEq for SandboxConfig
impl StructuralPartialEq for SandboxConfig
Auto Trait Implementations§
impl Freeze for SandboxConfig
impl RefUnwindSafe for SandboxConfig
impl Send for SandboxConfig
impl Sync for SandboxConfig
impl Unpin for SandboxConfig
impl UnsafeUnpin for SandboxConfig
impl UnwindSafe for SandboxConfig
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