Enum gstreamer::format::GenericFormattedValue

source ·
pub enum GenericFormattedValue {
    Undefined(Undefined),
    Default(Option<Default>),
    Bytes(Option<Bytes>),
    Time(Option<ClockTime>),
    Buffers(Option<Buffers>),
    Percent(Option<Percent>),
    Other(Format, Option<Other>),
}

Variants§

§

Undefined(Undefined)

§

Default(Option<Default>)

§

Bytes(Option<Bytes>)

§

Time(Option<ClockTime>)

§

Buffers(Option<Buffers>)

§

Percent(Option<Percent>)

§

Other(Format, Option<Other>)

Implementations§

source§

impl GenericFormattedValue

source

pub fn new(format: Format, value: i64) -> Self

source

pub fn format(&self) -> Format

source

pub fn value(&self) -> i64

Trait Implementations§

source§

impl Clone for GenericFormattedValue

source§

fn clone(&self) -> GenericFormattedValue

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl CompatibleFormattedValue<GenericFormattedValue> for GenericFormattedValue

§

type Original = GenericFormattedValue

source§

fn try_into_checked( self, other: GenericFormattedValue, ) -> Result<Self, FormattedValueError>

Returns Ok(self) with its type restored if it is compatible with the format of other. Read more
source§

fn try_into_checked_explicit( self, format: Format, ) -> Result<Self::Original, FormattedValueError>

Returns Ok(self) with its type restored if it is compatible with the format of V. Read more
source§

impl<V: SpecificFormattedValue> CompatibleFormattedValue<V> for GenericFormattedValue

§

type Original = GenericFormattedValue

source§

fn try_into_checked(self, _other: V) -> Result<Self, FormattedValueError>

Returns Ok(self) with its type restored if it is compatible with the format of other. Read more
source§

fn try_into_checked_explicit( self, _format: Format, ) -> Result<Self::Original, FormattedValueError>

Returns Ok(self) with its type restored if it is compatible with the format of V. Read more
source§

impl Debug for GenericFormattedValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for GenericFormattedValue

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for GenericFormattedValue

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Displayable for GenericFormattedValue

source§

impl FormattedValue for GenericFormattedValue

§

type FullRange = GenericFormattedValue

Type which allows building a FormattedValue of this format from any raw value.
source§

fn default_format() -> Format

source§

fn format(&self) -> Format

source§

fn is_some(&self) -> bool

Returns true if this FormattedValue represents a defined value.
source§

unsafe fn into_raw_value(self) -> i64

source§

fn is_none(&self) -> bool

Returns true if this FormattedValue represents an undefined value.
source§

impl FormattedValueFullRange for GenericFormattedValue

source§

unsafe fn from_raw(format: Format, value: i64) -> Self

source§

impl FormattedValueNoneBuilder for GenericFormattedValue

source§

fn none() -> Self

Returns the None value for Self as a FullRange if such a value can be represented. Read more
source§

fn none_for_format(format: Format) -> Self

Returns the None value for Self if such a value can be represented. Read more
source§

impl From<Buffers> for GenericFormattedValue

source§

fn from(v: Buffers) -> Self

Converts to this type from the input type.
source§

impl From<Bytes> for GenericFormattedValue

source§

fn from(v: Bytes) -> Self

Converts to this type from the input type.
source§

impl From<ClockTime> for GenericFormattedValue

source§

fn from(v: ClockTime) -> Self

Converts to this type from the input type.
source§

impl From<Default> for GenericFormattedValue

source§

fn from(v: Default) -> Self

Converts to this type from the input type.
source§

impl From<Option<Buffers>> for GenericFormattedValue

source§

fn from(v: Option<Buffers>) -> Self

Converts to this type from the input type.
source§

impl From<Option<Bytes>> for GenericFormattedValue

source§

fn from(v: Option<Bytes>) -> Self

Converts to this type from the input type.
source§

impl From<Option<ClockTime>> for GenericFormattedValue

source§

fn from(v: Option<ClockTime>) -> Self

Converts to this type from the input type.
source§

impl From<Option<Default>> for GenericFormattedValue

source§

fn from(v: Option<Default>) -> Self

Converts to this type from the input type.
source§

impl From<Option<Percent>> for GenericFormattedValue

source§

fn from(v: Option<Percent>) -> Self

Converts to this type from the input type.
source§

impl From<Percent> for GenericFormattedValue

source§

fn from(v: Percent) -> Self

Converts to this type from the input type.
source§

impl From<Undefined> for GenericFormattedValue

source§

fn from(v: Undefined) -> Self

Converts to this type from the input type.
source§

impl Hash for GenericFormattedValue

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl PartialEq for GenericFormattedValue

source§

fn eq(&self, other: &GenericFormattedValue) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for GenericFormattedValue

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl TryFrom<GenericFormattedValue> for Option<Buffers>

§

type Error = FormattedValueError

The type returned in the event of a conversion error.
source§

fn try_from(v: GenericFormattedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<GenericFormattedValue> for Option<Bytes>

§

type Error = FormattedValueError

The type returned in the event of a conversion error.
source§

fn try_from(v: GenericFormattedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<GenericFormattedValue> for Option<ClockTime>

§

type Error = FormattedValueError

The type returned in the event of a conversion error.
source§

fn try_from(v: GenericFormattedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<GenericFormattedValue> for Option<Default>

§

type Error = FormattedValueError

The type returned in the event of a conversion error.
source§

fn try_from(v: GenericFormattedValue) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<GenericFormattedValue> for Option<Percent>

§

type Error = FormattedValueError

The type returned in the event of a conversion error.
source§

fn try_from(v: GenericFormattedValue) -> Result<Option<Percent>, Self::Error>

Performs the conversion.
source§

impl TryFrom<GenericFormattedValue> for Undefined

§

type Error = FormattedValueError

The type returned in the event of a conversion error.
source§

fn try_from(v: GenericFormattedValue) -> Result<Undefined, Self::Error>

Performs the conversion.
source§

impl UnsignedIntoSigned for GenericFormattedValue

§

type Signed = GenericSignedFormattedValue

source§

fn into_positive(self) -> Self::Signed

Converts self into a Signed::Positive.
source§

fn into_negative(self) -> Self::Signed

Converts self into a Signed::Negative.
source§

fn into_signed(self, sign: i32) -> Self::Signed

Converts self into a Signed matching the given sign.
source§

impl Copy for GenericFormattedValue

source§

impl Eq for GenericFormattedValue

source§

impl FormattedValueIntrinsic for GenericFormattedValue

source§

impl SignedIntrinsic for GenericFormattedValue

source§

impl StructuralPartialEq for GenericFormattedValue

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CompatibleFormattedValue<GenericFormattedValue> for T

§

type Original = T

source§

fn try_into_checked( self, other: GenericFormattedValue, ) -> Result<T, FormattedValueError>

Returns Ok(self) with its type restored if it is compatible with the format of other. Read more
source§

fn try_into_checked_explicit( self, format: Format, ) -> Result<<T as CompatibleFormattedValue<GenericFormattedValue>>::Original, FormattedValueError>

Returns Ok(self) with its type restored if it is compatible with the format of V. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> NoneSignedBuilder for T

§

type Signed = <T as UnsignedIntoSigned>::Signed

source§

fn none_signed() -> <T as NoneSignedBuilder>::Signed

Returns the None value for Self as a Signed<FullRange> if such a value can be represented. Read more
source§

fn none_signed_for_format(format: Format) -> <T as NoneSignedBuilder>::Signed

Returns the None value for Self as a Signed<FullRange>, if such a value can be represented. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,