MCPcopy Create free account
hub / github.com/DioxusLabs/anyrender / begin_array_value

Method begin_array_value

crates/anyrender_serialize/src/json_formatter.rs:77–93  ·  view source on GitHub ↗
(
        &mut self,
        writer: &mut W,
        first: bool,
    )

Source from the content-addressed store, hash-verified

75 }
76
77 fn begin_array_value<W: ?Sized + std::io::Write>(
78 &mut self,
79 writer: &mut W,
80 first: bool,
81 ) -> std::io::Result<()> {
82 if self.current_is_pretty() {
83 if !first {
84 writer.write_all(b",")?;
85 }
86 writer.write_all(b"\n")?;
87 self.indent(writer)?;
88 } else if !first {
89 writer.write_all(b", ")?;
90 }
91 self.set_has_value();
92 Ok(())
93 }
94
95 fn begin_object<W: ?Sized + std::io::Write>(&mut self, writer: &mut W) -> std::io::Result<()> {
96 self.push();

Callers

nothing calls this directly

Calls 3

current_is_prettyMethod · 0.80
indentMethod · 0.80
set_has_valueMethod · 0.80

Tested by

no test coverage detected