Skip to main content

flags_from_json

Function flags_from_json 

Source
pub fn flags_from_json(json: Option<&str>) -> ReplicaFlags
Expand description

The inverse of flags_to_json: a NULL column decodes to the unknown set, and so does a column this cannot read.

Malformed JSON is not evidence about the item’s markers. Reading it as a known-empty set turns it into an authoritative “this item carries no markers”, which the merge takes as one side’s opinion: it clears every marker the other side reports and persists that, so a read failure becomes permanent loss. Unknown holds no opinion instead.