pub trait NativePolicy: Send + Sync {
// Required method
fn mode(&self) -> &'static str;
// Provided methods
fn allow_fs_path(
&self,
_operation: &str,
_path: &Path,
) -> Result<(), RuntimeError> { ... }
fn allow_network(
&self,
_operation: &str,
_host: &str,
_port: u16,
) -> Result<(), RuntimeError> { ... }
fn allow_sqlite_path(&self, _path: &Path) -> Result<(), RuntimeError> { ... }
fn allow_power(&self, _operation: &str) -> Result<(), RuntimeError> { ... }
}Required Methods§
Provided Methods§
fn allow_fs_path( &self, _operation: &str, _path: &Path, ) -> Result<(), RuntimeError>
fn allow_network( &self, _operation: &str, _host: &str, _port: u16, ) -> Result<(), RuntimeError>
fn allow_sqlite_path(&self, _path: &Path) -> Result<(), RuntimeError>
fn allow_power(&self, _operation: &str) -> Result<(), RuntimeError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".