forked from mirrors/gstreamer-rs
dcf6d16496
Previous proposition for constructing specific formatted values was to use an operation such as `42 * Default::ONE` which, in retrospect, doesn't seem idiomatic. This commit adds `from_u64` and `from_usize` constructors for most formatted values. Having `from_usize` is convenient when dealing with quantities related to containers indices or length. This also fixes the `Percent` from float constructors from which was derived the `ONE` constant as well as previous display implementation. Also removed the `pub` specifier for `Undefined` inner value. It wasn't removed in a previous commit as `Undefined` can use the full range of the inner type. But now, it seems preferable not to expose the inner value for proper encapsulation and so as to reduce the differences with other formatted values (kind of least astonishment principle). |
||
---|---|---|
.. | ||
auto | ||
subclass | ||
audio_aggregator.rs | ||
audio_aggregator_convert_pad.rs | ||
audio_aggregator_pad.rs | ||
audio_buffer.rs | ||
audio_channel_position.rs | ||
audio_converter.rs | ||
audio_decoder.rs | ||
audio_encoder.rs | ||
audio_format.rs | ||
audio_format_info.rs | ||
audio_info.rs | ||
audio_meta.rs | ||
audio_ring_buffer_spec.rs | ||
audio_stream_align.rs | ||
caps.rs | ||
flag_serde.rs | ||
functions.rs | ||
lib.rs | ||
utils.rs |