pub fn with_preset(preset: &str) -> Result<Self, ()> {
        match preset {
            "ewasm" => Ok(TrimExports {
                whitelist: ExportWhitelist::with_preset("ewasm").unwrap(),
            }),
            "pwasm" => Ok(TrimExports {
                whitelist: ExportWhitelist::with_preset("pwasm").unwrap(),
            }),
            _ => Err(()),
        }
    }
/// Takes a given preset string and constructs a context with the
/// corresponding whitelist.
Takes a given preset string and constructs a context with the
corresponding whitelist.
Takes a given preset string and constructs a context with the corresponding whitelist .
pub fn with_preset(preset: &str) -> Result<Self, ()> {
        match preset {
            "ewasm" => Ok(TrimExports {
                whitelist: ExportWhitelist::with_preset("ewasm").unwrap(),
            }),
            "pwasm" => Ok(TrimExports {
                whitelist: ExportWhitelist::with_preset("pwasm").unwrap(),
            }),
            _ => Err(()),
        }
    }
pub fn with_preset ( preset : & str ) -> Result < Self , ( ) > { match preset { " " => Ok ( TrimExports { whitelist : ExportWhitelist :: with_preset ( " " ) . unwrap ( ) , } ) , " " => Ok ( TrimExports { whitelist : ExportWhitelist :: with_preset ( " " ) . unwrap ( ) , } ) , _ => Err ( ( ) ) , } }
Takes a given preset string and constructs a context with the
corresponding whitelist.
Takes a given preset string and constructs a context with the corresponding whitelist .
preset
&str