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

Function create_test_request

libs/@local/codec/src/harpc/wire.rs:196–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

194 }
195
196 fn create_test_request() -> Request {
197 Request {
198 header: RequestHeader {
199 protocol: Protocol {
200 version: ProtocolVersion::V1,
201 },
202 request_id: get_request_id(),
203 flags: RequestFlags::from(RequestFlag::BeginOfRequest),
204 },
205 body: RequestBody::Begin(RequestBegin {
206 subsystem: SubsystemDescriptor {
207 id: SubsystemId::new(1),
208 version: Version { major: 0, minor: 1 },
209 },
210 procedure: ProcedureDescriptor {
211 id: ProcedureId::new(2),
212 },
213 payload: Payload::from_static(&[1, 2, 3, 4]),
214 }),
215 }
216 }
217
218 fn create_test_response() -> Response {
219 Response {

Callers 5

encode_decode_requestFunction · 0.85
partial_decodeFunction · 0.85
zero_length_payloadFunction · 0.85
large_payloadFunction · 0.85
invalid_length_markerFunction · 0.85

Calls 2

get_request_idFunction · 0.85
fromFunction · 0.50

Tested by 4

encode_decode_requestFunction · 0.68
partial_decodeFunction · 0.68
zero_length_payloadFunction · 0.68
large_payloadFunction · 0.68