pub trait NetPermissions {
// Required methods
fn check_net<T: AsRef<str>>(
&mut self,
host: &(T, Option<u16>),
api_name: &str,
) -> Result<(), PermissionCheckError>;
fn check_read(
&mut self,
p: &str,
api_name: &str,
) -> Result<PathBuf, PermissionCheckError>;
fn check_write(
&mut self,
p: &str,
api_name: &str,
) -> Result<PathBuf, PermissionCheckError>;
fn check_write_path<'a>(
&mut self,
p: &'a Path,
api_name: &str,
) -> Result<Cow<'a, Path>, PermissionCheckError>;
}
Required Methods§
fn check_net<T: AsRef<str>>( &mut self, host: &(T, Option<u16>), api_name: &str, ) -> Result<(), PermissionCheckError>
fn check_read( &mut self, p: &str, api_name: &str, ) -> Result<PathBuf, PermissionCheckError>
fn check_write( &mut self, p: &str, api_name: &str, ) -> Result<PathBuf, PermissionCheckError>
fn check_write_path<'a>( &mut self, p: &'a Path, api_name: &str, ) -> Result<Cow<'a, Path>, PermissionCheckError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.