Struct gstreamer::structure::StructureRef

source ·
pub struct StructureRef(/* private fields */);

Implementations§

source§

impl StructureRef

source

pub unsafe fn from_glib_borrow<'a>(ptr: *const GstStructure) -> &'a StructureRef

source

pub unsafe fn from_glib_borrow_mut<'a>( ptr: *mut GstStructure, ) -> &'a mut StructureRef

source

pub fn as_ptr(&self) -> *const GstStructure

source

pub fn as_mut_ptr(&self) -> *mut GstStructure

source

pub fn get<'a, T: FromValue<'a>>( &'a self, name: impl IntoGStr, ) -> Result<T, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>

source

pub fn get_optional<'a, T: FromValue<'a>>( &'a self, name: impl IntoGStr, ) -> Result<Option<T>, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>

source

pub fn value( &self, name: impl IntoGStr, ) -> Result<&SendValue, GetError<Infallible>>

source

pub fn get_by_quark<'a, T: FromValue<'a>>( &'a self, name: Quark, ) -> Result<T, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>

source

pub fn get_optional_by_quark<'a, T: FromValue<'a>>( &'a self, name: Quark, ) -> Result<Option<T>, GetError<<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error>>

source

pub fn value_by_quark( &self, name: Quark, ) -> Result<&SendValue, GetError<Infallible>>

source

pub fn set(&mut self, name: impl IntoGStr, value: impl Into<Value> + Send)

Sets field name to the given value value.

Overrides any default or previously defined value for name.

source

pub fn set_if( &mut self, name: impl IntoGStr, value: impl Into<Value> + Send, predicate: bool, )

Sets field name to the given inner value if value is Some.

This has no effect if the predicate evaluates to false, i.e. default or previous value for name is kept.

source

pub fn set_if_some( &mut self, name: impl IntoGStr, value: Option<impl Into<Value> + Send>, )

Sets field name to the given inner value if value is Some.

This has no effect if the value is None, i.e. default or previous value for name is kept.

source

pub fn set_from_iter<V: ValueType + Into<Value> + FromIterator<SendValue> + Send>( &mut self, name: impl IntoGStr, iter: impl IntoIterator<Item = impl ToSendValue>, )

Sets field name using the given ValueType V built from iter’s the Items.

Overrides any default or previously defined value for name.

source

pub fn set_if_not_empty<V: ValueType + Into<Value> + FromIterator<SendValue> + Send>( &mut self, name: impl IntoGStr, iter: impl IntoIterator<Item = impl ToSendValue>, )

Sets field name using the given ValueType V built from iter’s Items, if iter` is not empty.

This has no effect if iter is empty, i.e. previous value for name is unchanged.

source

pub fn set_value(&mut self, name: impl IntoGStr, value: SendValue)

Sets field name to the given value value.

Overrides any default or previously defined value for name.

source

pub fn set_value_if( &mut self, name: impl IntoGStr, value: SendValue, predicate: bool, )

Sets field name to the given inner value if value is Some.

This has no effect if the predicate evaluates to false, i.e. default or previous value for name is kept.

source

pub fn set_value_if_some( &mut self, name: impl IntoGStr, value: Option<SendValue>, )

Sets field name to the given inner value if value is Some.

This has no effect if the value is None, i.e. default or previous value for name is kept.

source

pub fn set_by_quark(&mut self, name: Quark, value: impl Into<Value> + Send)

source

pub fn set_by_quark_if_some( &mut self, name: Quark, value: Option<impl Into<Value> + Send>, )

source

pub fn set_value_by_quark(&mut self, name: Quark, value: SendValue)

source

pub fn set_value_by_quark_if_some( &mut self, name: Quark, value: Option<SendValue>, )

source

pub fn name<'a>(&self) -> &'a GStr

source

pub fn name_quark(&self) -> Quark

source

pub fn set_name(&mut self, name: impl IntoGStr)

source

pub fn set_name_if_some(&mut self, name: Option<impl IntoGStr>)

source

pub fn has_name(&self, name: &str) -> bool

source

pub fn has_field(&self, field: impl IntoGStr) -> bool

source

pub fn has_field_with_type(&self, field: impl IntoGStr, type_: Type) -> bool

source

pub fn has_field_by_quark(&self, field: Quark) -> bool

source

pub fn has_field_with_type_by_quark(&self, field: Quark, type_: Type) -> bool

source

pub fn remove_field(&mut self, field: impl IntoGStr)

source

pub fn remove_fields(&mut self, fields: impl IntoIterator<Item = impl IntoGStr>)

source

pub fn remove_all_fields(&mut self)

source

pub fn fields(&self) -> FieldIterator<'_>

source

pub fn iter(&self) -> Iter<'_>

source

pub fn nth_field_name<'a>(&self, idx: usize) -> Option<&'a GStr>

source

pub fn n_fields(&self) -> usize

source

pub fn len(&self) -> usize

source

pub fn is_empty(&self) -> bool

source

pub fn can_intersect(&self, other: &StructureRef) -> bool

source

pub fn intersect(&self, other: &StructureRef) -> Option<Structure>

source

pub fn is_subset(&self, superset: &StructureRef) -> bool

source

pub fn fixate(&mut self)

source

pub fn fixate_field(&mut self, name: impl IntoGStr) -> bool

source

pub fn fixate_field_bool(&mut self, name: impl IntoGStr, target: bool) -> bool

source

pub fn fixate_field_str( &mut self, name: impl IntoGStr, target: impl IntoGStr, ) -> bool

source

pub fn fixate_field_nearest_double( &mut self, name: impl IntoGStr, target: f64, ) -> bool

source

pub fn fixate_field_nearest_fraction( &mut self, name: impl IntoGStr, target: impl Into<Fraction>, ) -> bool

source

pub fn fixate_field_nearest_int( &mut self, name: impl IntoGStr, target: i32, ) -> bool

source

pub fn serialize(&self, flags: SerializeFlags) -> GString

source

pub fn serialize_strict( &self, flags: SerializeFlags, ) -> Result<GString, BoolError>

source

pub fn foreach<F: FnMut(Quark, &Value) -> ControlFlow<()>>( &self, func: F, ) -> bool

source

pub fn map_in_place<F: FnMut(Quark, &mut Value) -> ControlFlow<()>>( &mut self, func: F, ) -> bool

source

pub fn filter_map_in_place<F: FnMut(Quark, Value) -> Option<Value>>( &mut self, func: F, )

Trait Implementations§

source§

impl AsMut<StructureRef> for BufferPoolConfigRef

source§

fn as_mut(&mut self) -> &mut StructureRef

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsMut<StructureRef> for Structure

source§

fn as_mut(&mut self) -> &mut StructureRef

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<StructureRef> for BufferPoolConfigRef

source§

fn as_ref(&self) -> &StructureRef

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl AsRef<StructureRef> for Structure

source§

fn as_ref(&self) -> &StructureRef

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<StructureRef> for Structure

source§

fn borrow(&self) -> &StructureRef

Immutably borrows from an owned value. Read more
source§

impl BorrowMut<StructureRef> for Structure

source§

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

Mutably borrows from an owned value. Read more
source§

impl Debug for StructureRef

source§

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

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

impl Display for StructureRef

source§

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

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

impl<'a> Extend<(&'a GStr, SendValue)> for StructureRef

source§

fn extend<T: IntoIterator<Item = (&'a GStr, SendValue)>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<'a> Extend<(&'a str, SendValue)> for StructureRef

source§

fn extend<T: IntoIterator<Item = (&'a str, SendValue)>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl Extend<(GString, SendValue)> for StructureRef

source§

fn extend<T: IntoIterator<Item = (GString, SendValue)>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl Extend<(Quark, SendValue)> for StructureRef

source§

fn extend<T: IntoIterator<Item = (Quark, SendValue)>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl Extend<(String, SendValue)> for StructureRef

source§

fn extend<T: IntoIterator<Item = (String, SendValue)>>(&mut self, iter: T)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<'a> FromValue<'a> for &'a StructureRef

§

type Checker = GenericValueTypeOrNoneChecker<&'a StructureRef>

Value type checker.
source§

unsafe fn from_value(value: &'a Value) -> Self

Get the contained value from a Value. Read more
source§

impl<'a> IntoIterator for &'a StructureRef

§

type IntoIter = Iter<'a>

Which kind of iterator are we turning this into?
§

type Item = (&'static GStr, &'a SendValue)

The type of the elements being iterated over.
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl PartialEq<Structure> for StructureRef

source§

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

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

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

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

impl PartialEq<StructureRef> for Structure

source§

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

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

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

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

impl PartialEq for StructureRef

source§

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

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

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

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

impl Serialize for StructureRef

source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

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

impl StaticType for StructureRef

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl ToOwned for StructureRef

§

type Owned = Structure

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Structure

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

fn clone_into(&self, target: &mut Self::Owned)

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

impl ToValue for StructureRef

source§

fn to_value(&self) -> Value

Convert a value to a Value.
source§

fn value_type(&self) -> Type

Returns the type identifier of self. Read more
source§

impl ToValueOptional for StructureRef

source§

fn to_value_optional(s: Option<&Self>) -> Value

Convert an Option to a Value.
source§

impl Eq for StructureRef

source§

impl Send for StructureRef

source§

impl Sync for StructureRef

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> 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> StaticTypeExt for T
where T: StaticType,

source§

fn ensure_type()

Ensures that the type has been registered with the type system.
source§

impl<T> ToSendValue for T
where T: Send + ToValue + ?Sized,

source§

fn to_send_value(&self) -> SendValue

Returns a SendValue clone of self.
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.