Function ssb_validate::utils::is_correct_order[][src]

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

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.