MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / enable

Method enable

cranelift/codegen/src/settings.rs:242–256  ·  view source on GitHub ↗
(&mut self, name: &str)

Source from the content-addressed store, hash-verified

240
241impl Configurable for Builder {
242 fn enable(&mut self, name: &str) -> SetResult<()> {
243 use self::detail::Detail;
244 let (offset, detail) = self.lookup(name)?;
245 match detail {
246 Detail::Bool { bit } => {
247 self.set_bit(offset, bit, true);
248 Ok(())
249 }
250 Detail::Preset => {
251 self.apply_preset(&self.template.presets[offset..]);
252 Ok(())
253 }
254 _ => Err(SetError::BadType),
255 }
256 }
257
258 fn set(&mut self, name: &str, value: &str) -> SetResult<()> {
259 use self::detail::Detail;

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
set_bitMethod · 0.80
apply_presetMethod · 0.80
lookupMethod · 0.45

Tested by

no test coverage detected