MCPcopy Create free account
hub / github.com/ElementsProject/lightning / add_bytes

Method add_bytes

plugins/rest-plugin/src/yaml.rs:59–70  ·  view source on GitHub ↗
(&self, n: usize)

Source from the content-addressed store, hash-verified

57 }
58
59 fn add_bytes<E>(&self, n: usize) -> Result<(), E>
60 where
61 E: de::Error,
62 {
63 self.bytes.set(self.bytes.get() + n);
64 if self.bytes.get() > MAX_YAML_BYTES {
65 return Err(E::custom(format!(
66 "YAML body expands to more than {MAX_YAML_BYTES} bytes"
67 )));
68 }
69 Ok(())
70 }
71}
72
73struct BoundedVisitor<'a> {

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected