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

Function encode

libs/@local/harpc/wire-protocol/src/request/header.rs:93–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91
92 #[test]
93 fn encode() {
94 let producer = RequestIdProducer::new();
95
96 let header = RequestHeader {
97 protocol: Protocol {
98 version: ProtocolVersion::V1,
99 },
100 request_id: producer.produce(),
101 flags: RequestFlags::from(RequestFlag::BeginOfRequest),
102 };
103
104 assert_encode(
105 &header,
106 expect![[r#"
107 b'h' b'a' b'r' b'p' b'c' 0x01 0x00 0x00 0x00 0x00 0x80
108 "#]],
109 );
110 }
111
112 #[test]
113 fn decode() {

Callers

nothing calls this directly

Calls 3

assert_encodeFunction · 0.85
fromFunction · 0.50
produceMethod · 0.45

Tested by

no test coverage detected