is_correct_order

Function is_correct_order 

Source
pub fn is_correct_order(bytes: &[u8]) -> bool
Expand description

Check that the top-level fields (keys) comprising the given message value are in the correct order.

The message value is expected to be provided in the form of a byte array. A regular expression is used to match on the order of the fields. The order of the second and third fields ("author" and "sequence") can be reversed. For more information on this and other quirks, you may wish to peruse the issues and code for the JavaScript ssb-validate library.