Extract `sys_from_ms` from a versioned key. Returns `None` if the key has no NUL separator (defensive — should not happen for keys produced by [`versioned_doc_key`]).
(key: &str)
| 52 | /// has no NUL separator (defensive — should not happen for keys produced |
| 53 | /// by [`versioned_doc_key`]). |
| 54 | pub fn parse_sys_from(key: &str) -> Option<i64> { |
| 55 | let (_, suffix) = key.rsplit_once('\x00')?; |
| 56 | suffix.parse().ok() |
| 57 | } |
| 58 | |
| 59 | /// Extract `doc_id` slice from a versioned key (between the `{coll}:` and |
| 60 | /// `\x00` boundaries). Returns the whole remainder when parsing fails. |