Struct gstreamer::caps::CapsRef

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

Implementations§

source§

impl CapsRef

source

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

source

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

source

pub unsafe fn from_ptr<'a>(ptr: *const GstCaps) -> &'a Self

source

pub unsafe fn from_mut_ptr<'a>(ptr: *mut GstCaps) -> &'a mut Self

source

pub fn copy(&self) -> Caps

source

pub fn upcast_ref(&self) -> &MiniObjectRef

source

pub fn upcast_mut(&mut self) -> &mut MiniObjectRef

source

pub fn ptr_eq(this: &CapsRef, other: &CapsRef) -> bool

source§

impl CapsRef

source

pub fn set(&mut self, name: impl IntoGStr, value: impl ToSendValue + Sync)

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 ToSendValue + Sync, 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 ToSendValue + Sync>, )

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 + ToSendValue + FromIterator<SendValue> + Sync>( &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 + ToSendValue + FromIterator<SendValue> + Sync>( &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 structure(&self, idx: usize) -> Option<&StructureRef>

source

pub fn structure_mut(&mut self, idx: usize) -> Option<&mut StructureRef>

source

pub fn features(&self, idx: usize) -> Option<&CapsFeaturesRef>

source

pub fn features_mut(&mut self, idx: usize) -> Option<&mut CapsFeaturesRef>

source

pub fn set_features(&mut self, idx: usize, features: Option<CapsFeatures>)

source

pub fn set_features_simple(&mut self, features: Option<CapsFeatures>)

source

pub fn size(&self) -> usize

source

pub fn len(&self) -> usize

source

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

source

pub fn iter_mut(&mut self) -> IterMut<'_>

source

pub fn iter_with_features(&self) -> IterFeatures<'_>

source

pub fn iter_with_features_mut(&mut self) -> IterFeaturesMut<'_>

source

pub fn append_structure(&mut self, structure: Structure)

source

pub fn append_structure_full( &mut self, structure: Structure, features: Option<CapsFeatures>, )

source

pub fn remove_structure(&mut self, idx: usize)

source

pub fn append(&mut self, other: Caps)

source

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

source

pub fn intersect(&self, other: &Self) -> Caps

source

pub fn intersect_with_mode(&self, other: &Self, mode: CapsIntersectMode) -> Caps

source

pub fn is_always_compatible(&self, other: &Self) -> bool

source

pub fn is_any(&self) -> bool

source

pub fn is_empty(&self) -> bool

source

pub fn is_fixed(&self) -> bool

source

pub fn is_equal_fixed(&self, other: &Self) -> bool

source

pub fn is_strictly_equal(&self, other: &Self) -> bool

source

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

source

pub fn is_subset_structure(&self, structure: &StructureRef) -> bool

source

pub fn is_subset_structure_full( &self, structure: &StructureRef, features: Option<&CapsFeaturesRef>, ) -> bool

source

pub fn subtract(&self, other: &Self) -> Caps

source

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

source

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

source

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

source

pub fn filter_map_in_place<F: FnMut(&mut CapsFeaturesRef, &mut StructureRef) -> CapsFilterMapAction>( &mut self, func: F, )

Trait Implementations§

source§

impl AsRef<CapsRef> for Caps

source§

fn as_ref(&self) -> &CapsRef

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

impl Borrow<CapsRef> for Caps

source§

fn borrow(&self) -> &CapsRef

Immutably borrows from an owned value. Read more
source§

impl Debug for CapsRef

source§

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

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

impl Display for CapsRef

source§

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

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

impl Extend<(Structure, CapsFeatures)> for CapsRef

source§

fn extend<T: IntoIterator<Item = (Structure, CapsFeatures)>>(&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<(Structure, Option<CapsFeatures>)> for CapsRef

source§

fn extend<T: IntoIterator<Item = (Structure, Option<CapsFeatures>)>>( &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<Caps> for CapsRef

source§

fn extend<T: IntoIterator<Item = Caps>>(&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<Structure> for CapsRef

source§

fn extend<T: IntoIterator<Item = Structure>>(&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 CapsRef

§

type Checker = GenericValueTypeOrNoneChecker<&'a CapsRef>

Value type checker.
source§

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

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

impl GlibPtrDefault for CapsRef

source§

impl<'a> IntoIterator for &'a CapsRef

§

type IntoIter = IterFeatures<'a>

Which kind of iterator are we turning this into?
§

type Item = (&'a StructureRef, &'a CapsFeaturesRef)

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<'a> IntoIterator for &'a mut CapsRef

§

type IntoIter = IterFeaturesMut<'a>

Which kind of iterator are we turning this into?
§

type Item = (&'a mut StructureRef, &'a mut CapsFeaturesRef)

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<Caps> for CapsRef

source§

fn eq(&self, other: &Caps) -> 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<CapsRef> for Caps

source§

fn eq(&self, other: &CapsRef) -> 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 CapsRef

source§

fn eq(&self, other: &CapsRef) -> 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 CapsRef

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 CapsRef

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl ToOwned for CapsRef

§

type Owned = Caps

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Caps

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 Eq for CapsRef

source§

impl Send for CapsRef

source§

impl Sync for CapsRef

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> 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.