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

Method as_enum

cranelift/codegen/src/settings.rs:97–99  ·  view source on GitHub ↗

Gets the enum value if the value is from an enum setting.

(&self)

Source from the content-addressed store, hash-verified

95
96 /// Gets the enum value if the value is from an enum setting.
97 pub fn as_enum(&self) -> Option<&'static str> {
98 self.values.map(|v| v[self.value as usize])
99 }
100
101 /// Gets the numerical value if the value is from a num setting.
102 pub fn as_num(&self) -> Option<u8> {

Callers 3

value_stringMethod · 0.80
fmtMethod · 0.80
to_flag_valueFunction · 0.80

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected