Skip to main content

MAX_VALUE_BYTES

Constant MAX_VALUE_BYTES 

Source
pub const MAX_VALUE_BYTES: usize = policy::MAX_DOC_BYTES /* 1_048_576usize */;
Expand description

Replicated-document types.

Re-exported so callers never name offline-protocol-data directly: the value model and the size constants are part of this crate’s surface, and the engine behind them is not part of anyone’s. Longest accepted single value, equal to the whole-document cap.

A value at or past this size can never fit inside a document that also has to hold its own framing, so accepting one only defers the refusal to a place where it is expensive: an unbounded value makes a commit whose delta record cannot be written at all, and a delta that cannot be written is re-exported larger at every retry. Refusing at the operation keeps that failure in front of the caller, while the edit is still theirs to change.