dicom_core::value::deserialize

Function parse_time

Source
pub fn parse_time(buf: &[u8]) -> Result<(NaiveTime, &[u8]), Error>
Expand description

Decode a single DICOM Time (TM) into a chrono::NaiveTime value.

  • If a time component is missing, the operation fails.
  • Presence of the second fraction component .FFFFFF is mandatory with at least one digit accuracy .F while missing digits default to zero.
  • For Time with missing components, or if exact second fraction accuracy needs to be preserved, use parse_time_partial.