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

Method as_num

cranelift/codegen/src/settings.rs:102–107  ·  view source on GitHub ↗

Gets the numerical value if the value is from a num setting.

(&self)

Source from the content-addressed store, hash-verified

100
101 /// Gets the numerical value if the value is from a num setting.
102 pub fn as_num(&self) -> Option<u8> {
103 match &self.detail {
104 detail::Detail::Num => Some(self.value),
105 _ => None,
106 }
107 }
108
109 /// Gets the boolean value if the value is from a boolean setting.
110 pub fn as_bool(&self) -> Option<bool> {

Callers 3

value_stringMethod · 0.80
fmtMethod · 0.80
to_flag_valueFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected