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

Function build_reject

nodedb/src/control/array_sync/reject.rs:12–24  ·  view source on GitHub ↗

Build an [`ArrayRejectMsg`] for a rejected inbound op. `op_hlc` is the HLC of the offending op. `reason` is a structured code. `detail` is a human-readable explanation.

(
    array: &str,
    op_hlc: Hlc,
    reason: ArrayRejectReason,
    detail: impl Into<String>,
)

Source from the content-addressed store, hash-verified

10/// `op_hlc` is the HLC of the offending op. `reason` is a structured code.
11/// `detail` is a human-readable explanation.
12pub fn build_reject(
13 array: &str,
14 op_hlc: Hlc,
15 reason: ArrayRejectReason,
16 detail: impl Into<String>,
17) -> ArrayRejectMsg {
18 ArrayRejectMsg {
19 array: array.to_owned(),
20 op_hlc_bytes: op_hlc.to_bytes(),
21 reason,
22 detail: detail.into(),
23 }
24}

Callers 9

propose_and_awaitMethod · 0.85
apply_op_directMethod · 0.85
op_to_data_plane_planMethod · 0.85
handle_deltaMethod · 0.85
handle_delta_batchMethod · 0.85
handle_schemaMethod · 0.85
apply_opMethod · 0.85
handle_snapshot_chunkMethod · 0.85

Calls 1

to_bytesMethod · 0.45

Tested by

no test coverage detected