MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / response_ok

Function response_ok

nodedb/src/bridge/envelope.rs:378–391  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

376
377 #[test]
378 fn response_ok() {
379 let resp = Response {
380 request_id: RequestId::new(1),
381 status: Status::Ok,
382 attempt: 1,
383 partial: false,
384 payload: Payload::from_vec(b"result".to_vec()),
385 watermark_lsn: Lsn::new(42),
386 error_code: None,
387 };
388 assert_eq!(resp.status, Status::Ok);
389 assert_eq!(resp.watermark_lsn, Lsn::new(42));
390 assert_eq!(&*resp.payload, b"result");
391 }
392
393 #[test]
394 fn response_error() {

Callers

nothing calls this directly

Calls 1

to_vecMethod · 0.45

Tested by

no test coverage detected