Skip to main content

split_key_dt

Function split_key_dt 

Source
pub fn split_key_dt(
    key: impl AsRef<[u8]>,
) -> Result<(Vec<u8>, DateTime<Utc>), DBError>
Expand description

Returns tuple of pre and datetime from key

§Parameters

  • key - database key

§Returns

  • Result<(Vec<u8>, DateTime<Utc>), DBError> - tuple of pre and datetime

§Errors

  • DBError::ValueError - if key cannot be split
  • DBError::ParseError - if the datetime part cannot be parsed