pub fn new(
        rules: SeccompRuleMap,
        default_action: SeccompAction,
        target_arch: &str,
    ) -> Result<Self> {
        let instance = Self {
            rules,
            default_action,
            target_arch: target_arch.try_into().map_err(Error::Arch)?,
        };

        instance.validate()?;

        Ok(instance)
    }
/// Creates a new filter with a set of rules and a default action.
///
/// # Arguments
///
/// * `rules` - Map of syscall numbers and the rules that will be applied to each of them.
/// * `default_action` - Action taken for all syscalls that do not match any rule.
/// * `target_arch` - Target architecture of the generated BPF filter.
Creates a new filter with a set of rules and a default action.
Creates a new filter with a set of rules and a default action .
pub fn new(
        rules: SeccompRuleMap,
        default_action: SeccompAction,
        target_arch: &str,
    ) -> Result<Self> {
        let instance = Self {
            rules,
            default_action,
            target_arch: target_arch.try_into().map_err(Error::Arch)?,
        };
        instance.validate()?;
        Ok(instance)
    }
pub fn new ( rules : SeccompRuleMap , default_action : SeccompAction , target_arch : & str , ) -> Result < Self > { let instance = Self { rules , default_action , target_arch : target_arch . try_into ( ) . map_err ( Error :: Arch ) ? , } ; instance . validate ( ) ? ; Ok ( instance ) }
Creates a new filter with a set of rules and a default action.
Creates a new filter with a set of rules and a default action .
rules
SeccompRuleMap
default_action
SeccompAction
target_arch
&str
rules
SeccompRuleMap
default_action
SeccompAction
target_arch
&str