MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / with_indent

Method with_indent

crates/codegen/src/code_indenter.rs:55–58  ·  view source on GitHub ↗

Invoke `f` while indenting one level greater than `self` currently does.

(&mut self, f: impl FnOnce(&mut Self) -> Res)

Source from the content-addressed store, hash-verified

53
54 /// Invoke `f` while indenting one level greater than `self` currently does.
55 pub fn with_indent<Res>(&mut self, f: impl FnOnce(&mut Self) -> Res) -> Res {
56 let mut indenter = self.indented(1);
57 f(&mut indenter)
58 }
59
60 // Writes a newline without setting the `needs_indenting` flag.
61 // TODO(cloutiertyler): I think it should set the flag, but I don't know

Callers 5

define_body_for_reducerFunction · 0.80
define_body_for_productFunction · 0.80
define_body_for_sumFunction · 0.80
delimited_blockMethod · 0.80

Calls 1

indentedMethod · 0.80

Tested by

no test coverage detected