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

Method value_string

cranelift/codegen/src/settings.rs:118–126  ·  view source on GitHub ↗

Builds a string from the current value

(&self)

Source from the content-addressed store, hash-verified

116
117 /// Builds a string from the current value
118 pub fn value_string(&self) -> String {
119 match self.kind() {
120 SettingKind::Enum => self.as_enum().map(|b| b.to_string()),
121 SettingKind::Num => self.as_num().map(|b| b.to_string()),
122 SettingKind::Bool => self.as_bool().map(|b| b.to_string()),
123 SettingKind::Preset => unreachable!(),
124 }
125 .unwrap()
126 }
127}
128
129impl fmt::Display for Value {

Callers 6

build_host_isaFunction · 0.80
compile_testfileFunction · 0.80
set_isa_flagsMethod · 0.80
write_non_default_flagsFunction · 0.80
from_target_isaMethod · 0.80

Calls 7

as_enumMethod · 0.80
as_numMethod · 0.80
unwrapMethod · 0.45
kindMethod · 0.45
mapMethod · 0.45
to_stringMethod · 0.45
as_boolMethod · 0.45

Tested by 2

build_host_isaFunction · 0.64
compile_testfileFunction · 0.64