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

Function utf8

plugins/src/codec.rs:24–27  ·  view source on GitHub ↗
(buf: &[u8])

Source from the content-addressed store, hash-verified

22}
23
24fn utf8(buf: &[u8]) -> Result<&str, io::Error> {
25 str::from_utf8(buf)
26 .map_err(|_| io::Error::new(io::ErrorKind::InvalidData, "Unable to decode input as UTF8"))
27}
28
29impl Decoder for MultiLineCodec {
30 type Item = String;

Callers 1

decodeMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected