Skip to main content

NativePolicy

Trait NativePolicy 

Source
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§

Source

fn mode(&self) -> &'static str

Provided Methods§

Source

fn allow_fs_path( &self, _operation: &str, _path: &Path, ) -> Result<(), RuntimeError>

Source

fn allow_network( &self, _operation: &str, _host: &str, _port: u16, ) -> Result<(), RuntimeError>

Source

fn allow_sqlite_path(&self, _path: &Path) -> Result<(), RuntimeError>

Source

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".

Implementors§