MCPcopy Create free account
hub / github.com/hashintel/hash / decode

Method decode

libs/@local/harpc/wire-protocol/src/request/flags.rs:78–85  ·  view source on GitHub ↗
(buffer: &mut Buffer<B>, (): ())

Source from the content-addressed store, hash-verified

76 type Error = BufferError;
77
78 fn decode<B>(buffer: &mut Buffer<B>, (): ()) -> Result<Self, Report<Self::Error>>
79 where
80 B: Buf,
81 {
82 u8::decode(buffer, ())
83 .map(BitFlags::from_bits_truncate)
84 .map(From::from)
85 }
86}
87
88#[cfg(test)]

Callers

nothing calls this directly

Calls 2

decodeFunction · 0.70
mapMethod · 0.45

Tested by

no test coverage detected