gstreamer-rs/gstreamer-base/src
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
..
auto Regenerate 2022-06-30 08:46:06 +03:00
subclass Implement FormattedValue on any candidate type 2022-07-11 19:45:52 +02:00
adapter.rs Use IntoGlibPtr trait instead of implementing into_ptr 2022-05-07 13:38:11 +02:00
aggregator.rs Implement FormattedValue on any candidate type 2022-07-11 19:45:52 +02:00
aggregator_pad.rs manual code: fix-getters-def doc aliases 2021-05-03 20:46:57 +02:00
base_parse.rs Implement FormattedValue on any candidate type 2022-07-11 19:45:52 +02:00
base_parse_frame.rs Use IntoGlibPtr trait instead of implementing into_ptr 2022-05-07 13:38:11 +02:00
base_sink.rs Return base class pads by reference instead of strong reference 2022-05-05 14:18:03 +03:00
base_src.rs Return base class pads by reference instead of strong reference 2022-05-05 14:18:03 +03:00
base_transform.rs Return base class pads by reference instead of strong reference 2022-05-05 14:18:03 +03:00
flow_combiner.rs base: Fix new clippy warning 2021-07-30 12:34:27 +03:00
functions.rs Use impl for AsRef trait bounds 2021-09-21 23:54:07 +02:00
lib.rs Store whether GStreamer was initialized in an AtomicBool 2022-06-27 10:28:28 +03:00
utils.rs Generate missing doc aliases for newtypes 2021-06-01 15:15:59 +02:00