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

Method line

cranelift/srcgen/src/lib.rs:134–137  ·  view source on GitHub ↗

Add an indented line.

(&mut self, contents: impl AsRef<str>)

Source from the content-addressed store, hash-verified

132
133 /// Add an indented line.
134 pub fn line(&mut self, contents: impl AsRef<str>) {
135 let indented_line = format!("{}{}\n", self.get_indent(), contents.as_ref());
136 self.lines.push(indented_line);
137 }
138
139 /// Add an indented lin with a given a `location` appended as a comment to
140 /// the line (this is useful for identifying where a line was generated).

Callers 15

multi_lineMethod · 0.45
commentMethod · 0.45
doc_commentMethod · 0.45
add_blockMethod · 0.45
add_matchMethod · 0.45
gen_common_isleFunction · 0.45
gen_isle_enumFunction · 0.45
gen_formatsFunction · 0.45
gen_instruction_dataFunction · 0.45

Calls 1

pushMethod · 0.45

Tested by 3