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

Function encode_frame

libs/@local/harpc/wire-protocol/src/request/mod.rs:257–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

255
256 #[test]
257 fn encode_frame() {
258 assert_encode(
259 &Request {
260 header: EXAMPLE_HEADER,
261 body: RequestBody::Frame(RequestFrame {
262 payload: Payload::from_static(b"hello world"),
263 }),
264 },
265 expect![[r#"
266 b'h' b'a' b'r' b'p' b'c' 0x01 0x89 0xAB 0xCD 0xEF 0x00 0x00 0x00 0x00 0x00 0x00
267 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x0B
268 b'h' b'e' b'l' b'l' b'o' b' ' b'w' b'o' b'r' b'l' b'd'
269 "#]],
270 );
271 }
272
273 #[test]
274 fn encode_frame_begin_of_request_set() {

Callers

nothing calls this directly

Calls 2

assert_encodeFunction · 0.85
FrameEnum · 0.50

Tested by

no test coverage detected