gstreamer-rs/gstreamer-base/src/subclass
François Laignel fe319af598 Implement FormattedValue on any candidate type
The trait FormattedValue was only implemented on types which
could implement the full range of values for a Format. In order
to declare a function which could take both the intrinsic type
of any Format (e.g. `ClockTime`) as well the full range of values
(e.g. `Option<ClockTime>`), the argument was declared:

```rust
    impl Into<GenericFormattedValue>,
```

This commit implements `FormattedValue` for any type representing
a format. E.g.: both `ClockTime` and `Option<ClockTime>` will now
implement `FormattedValue`. The trait `FormattedValueFullRange`
is implemented on types which can be built from any raw value.

These changes are intended to help for the implementation of a
means to enforce format conformity at compilation time for
functions with multiple formatted value arguments.

The following signatures were found to be incorrect and are fixed:

- `message::StepDone`: forced the type for `amount` and `duration`
  to be of the same type, when `duration` is expected to be of the
  `Time` format.
- `query::Convert::set`: the two arguments were forced to the same
  type, so potentialy the same format, unless a
  `GenericFormattedValue` was used.

See https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1059
2022-07-11 19:45:52 +02:00
..
aggregator.rs Use IntoGlibPtr trait instead of implementing into_ptr 2022-05-07 13:38:11 +02:00
aggregator_pad.rs Change from impl_() to imp() 2021-12-28 17:50:06 +02:00
base_parse.rs Implement FormattedValue on any candidate type 2022-07-11 19:45:52 +02:00
base_sink.rs Use IntoGlibPtr trait instead of implementing into_ptr 2022-05-07 13:38:11 +02:00
base_src.rs base: Fix memory leak if BaseSrc/PushSrc parent class is not filling the provided buffer as it should 2022-06-24 11:13:06 +03:00
base_transform.rs Use IntoGlibPtr trait instead of implementing into_ptr 2022-05-07 13:38:11 +02:00
mod.rs Update minimum supported version to 1.14 2022-04-07 12:45:47 +03:00
push_src.rs Fix/silence a couple new clippy warnings 2022-06-30 13:08:33 +00:00