Trait gstreamer::format::FormattedValueNoneBuilder
source · pub trait FormattedValueNoneBuilder: FormattedValueFullRange {
// Required method
fn none() -> Self;
// Provided method
fn none_for_format(format: Format) -> Self { ... }
}
Required Methods§
sourcefn none() -> Self
fn none() -> Self
Returns the None
value for Self
as a FullRange
if such a value can be represented.
- For
SpecificFormattedValue
s, this results inOption::<FormattedValueIntrinsic>::None
. - For
GenericFormattedValue
, this can only be obtained usingSelf::none_for_format
because theNone
is an inner value of some of the variants.
§Panics
Panics if Self
is GenericFormattedValue
in which case, the Format
must be known.
Provided Methods§
sourcefn none_for_format(format: Format) -> Self
fn none_for_format(format: Format) -> Self
Returns the None
value for Self
if such a value can be represented.
- For
SpecificFormattedValue
s, this is the same asSelf::none()
if theformat
matches theSpecificFormattedValue
’s format. - For
GenericFormattedValue
this is the variant for the specifiedformat
, initialized withNone
as a value, if theformat
can represent that value.
§Panics
Panics if None
can’t be represented by Self
for format
or by the requested
GenericFormattedValue
variant.
Object Safety§
This trait is not object safe.