• Sebastian Dröge's avatar
    Change FormatValue related API to be more convenient to use · c99928d0
    Sebastian Dröge authored
    FormatValue is now renamed to GenericFormattedValue and the API slightly
    changed. In addition there is now a FormattedValue trait, and a
    SpecificFormattedValue trait plus types for Bytes, Buffers and the
    existing ClockTime.
    
    This allows to create functions like
      Pad::query_duration<F: SpecificFormattedValue>() -> Option<F>
    and doesn't require the caller to unwrap the generic value anymore,
    which is completely unneeded in these cases.
    
    In addition, Segment became FormattedSegment<T> with API to
    upcast/downcast between the specific formatted values and the generic
    formatted value. This greatly simplifies usage of Segments.
    c99928d0
Name
Last commit
Last update
..
src Loading commit data...
Cargo.toml Loading commit data...