#[repr(transparent)]pub struct Structure(_);
Implementations
sourceimpl Structure
impl Structure
pub fn builder(name: &str) -> Builder
pub fn new_empty(name: &str) -> Structure
pub fn new(
name: &str,
values: &[(&str, &(dyn ToSendValue + Sync))]
) -> Structure
pub unsafe fn into_ptr(self) -> *mut GstStructure
pub fn from_iter<'a>(
name: &str,
iter: impl IntoIterator<Item = (&'a str, SendValue)>
) -> Structure
Methods from Deref<Target = StructureRef>
pub unsafe fn as_ptr(&self) -> *const GstStructure
pub unsafe fn as_mut_ptr(&self) -> *mut GstStructure
pub fn get<'a, T: FromValue<'a>>(&'a self, name: &str) -> Result<T, GetError> where
<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error: GlibValueError,
pub fn get_optional<'a, T: FromValue<'a>>(
&'a self,
name: &str
) -> Result<Option<T>, GetError> where
<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error: GlibValueError,
pub fn value(&self, name: &str) -> Result<&SendValue, GetError>
pub fn get_by_quark<'a, T: FromValue<'a>>(
&'a self,
name: Quark
) -> Result<T, GetError> where
<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error: GlibValueError,
pub fn get_optional_by_quark<'a, T: FromValue<'a>>(
&'a self,
name: Quark
) -> Result<Option<T>, GetError> where
<<T as FromValue<'a>>::Checker as ValueTypeChecker>::Error: GlibValueError,
pub fn value_by_quark(&self, name: Quark) -> Result<&SendValue, GetError>
pub fn set<T: ToSendValue + Sync>(&mut self, name: &str, value: T)
pub fn set_value(&mut self, name: &str, value: SendValue)
pub fn set_by_quark<T: ToSendValue + Sync>(&mut self, name: Quark, value: T)
pub fn set_value_by_quark(&mut self, name: Quark, value: SendValue)
pub fn name<'a>(&self) -> &'a str
pub fn name_quark(&self) -> Quark
pub fn set_name(&mut self, name: &str)
pub fn has_name(&self, name: &str) -> bool
pub fn has_field(&self, field: &str) -> bool
pub fn has_field_with_type(&self, field: &str, type_: Type) -> bool
pub fn has_field_by_quark(&self, field: Quark) -> bool
pub fn has_field_with_type_by_quark(&self, field: Quark, type_: Type) -> bool
pub fn remove_field(&mut self, field: &str)
pub fn remove_fields(&mut self, fields: &[&str])
pub fn remove_all_fields(&mut self)
pub fn fields(&self) -> FieldIterator<'_>ⓘNotable traits for FieldIterator<'a>impl<'a> Iterator for FieldIterator<'a> type Item = &'static str;
pub fn iter(&self) -> Iter<'_>ⓘNotable traits for Iter<'a>impl<'a> Iterator for Iter<'a> type Item = (&'static str, &'a SendValue);
pub fn nth_field_name<'a>(&self, idx: u32) -> Option<&'a str>
pub fn n_fields(&self) -> u32
pub fn can_intersect(&self, other: &StructureRef) -> bool
pub fn intersect(&self, other: &StructureRef) -> Option<Structure>
pub fn is_subset(&self, superset: &StructureRef) -> bool
pub fn fixate(&mut self)
pub fn fixate_field(&mut self, name: &str) -> bool
pub fn fixate_field_bool(&mut self, name: &str, target: bool) -> bool
pub fn fixate_field_str(&mut self, name: &str, target: &str) -> bool
pub fn fixate_field_nearest_double(&mut self, name: &str, target: f64) -> bool
pub fn fixate_field_nearest_fraction<T: Into<Fraction>>(
&mut self,
name: &str,
target: T
) -> bool
pub fn fixate_field_nearest_int(&mut self, name: &str, target: i32) -> bool
pub fn serialize(&self, flags: SerializeFlags) -> GString
v1_20
only.pub fn foreach<F: FnMut(Quark, &Value) -> ControlFlow<()>>(
&self,
func: F
) -> bool
pub fn map_in_place<F: FnMut(Quark, &mut Value) -> ControlFlow<()>>(
&mut self,
func: F
) -> bool
pub fn filter_map_in_place<F: FnMut(Quark, Value) -> Option<Value>>(
&mut self,
func: F
)
Trait Implementations
sourceimpl AsMut<StructureRef> for Structure
impl AsMut<StructureRef> for Structure
sourcefn as_mut(&mut self) -> &mut StructureRef
fn as_mut(&mut self) -> &mut StructureRef
Converts this type into a mutable reference of the (usually inferred) input type.
sourceimpl AsRef<StructureRef> for Structure
impl AsRef<StructureRef> for Structure
sourcefn as_ref(&self) -> &StructureRef
fn as_ref(&self) -> &StructureRef
Converts this type into a shared reference of the (usually inferred) input type.
sourceimpl Borrow<StructureRef> for Structure
impl Borrow<StructureRef> for Structure
sourcefn borrow(&self) -> &StructureRef
fn borrow(&self) -> &StructureRef
Immutably borrows from an owned value. Read more
sourceimpl BorrowMut<StructureRef> for Structure
impl BorrowMut<StructureRef> for Structure
sourcefn borrow_mut(&mut self) -> &mut StructureRef
fn borrow_mut(&mut self) -> &mut StructureRef
Mutably borrows from an owned value. Read more
sourceimpl Deref for Structure
impl Deref for Structure
type Target = StructureRef
type Target = StructureRef
The resulting type after dereferencing.
sourcefn deref(&self) -> &StructureRef
fn deref(&self) -> &StructureRef
Dereferences the value.
sourceimpl DerefMut for Structure
impl DerefMut for Structure
sourcefn deref_mut(&mut self) -> &mut StructureRef
fn deref_mut(&mut self) -> &mut StructureRef
Mutably dereferences the value.
sourceimpl<'de> Deserialize<'de> for Structure
impl<'de> Deserialize<'de> for Structure
sourcefn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Extend<Structure> for CapsRef
impl Extend<Structure> for CapsRef
sourcefn extend<T: IntoIterator<Item = Structure>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = Structure>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
sourcefn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Extends a collection with exactly one element.
sourcefn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Reserves capacity in a collection for the given number of additional elements. Read more
sourceimpl FromGlibPtrFull<*const GstStructure> for Structure
impl FromGlibPtrFull<*const GstStructure> for Structure
sourceunsafe fn from_glib_full(ptr: *const GstStructure) -> Self
unsafe fn from_glib_full(ptr: *const GstStructure) -> Self
Safety Read more
sourceimpl FromGlibPtrFull<*mut GstStructure> for Structure
impl FromGlibPtrFull<*mut GstStructure> for Structure
sourceunsafe fn from_glib_full(ptr: *mut GstStructure) -> Self
unsafe fn from_glib_full(ptr: *mut GstStructure) -> Self
Safety Read more
sourceimpl FromGlibPtrNone<*const GstStructure> for Structure
impl FromGlibPtrNone<*const GstStructure> for Structure
sourceunsafe fn from_glib_none(ptr: *const GstStructure) -> Self
unsafe fn from_glib_none(ptr: *const GstStructure) -> Self
Safety Read more
sourceimpl FromGlibPtrNone<*mut GstStructure> for Structure
impl FromGlibPtrNone<*mut GstStructure> for Structure
sourceunsafe fn from_glib_none(ptr: *mut GstStructure) -> Self
unsafe fn from_glib_none(ptr: *mut GstStructure) -> Self
Safety Read more
sourceimpl FromIterator<Structure> for Caps
impl FromIterator<Structure> for Caps
sourcefn from_iter<T: IntoIterator<Item = Structure>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = Structure>>(iter: T) -> Self
Creates a value from an iterator. Read more
sourceimpl<'a> FromValue<'a> for Structure
impl<'a> FromValue<'a> for Structure
type Checker = GenericValueTypeOrNoneChecker<Structure>
type Checker = GenericValueTypeOrNoneChecker<Structure>
Value type checker.
sourceunsafe fn from_value(value: &'a Value) -> Self
unsafe fn from_value(value: &'a Value) -> Self
Get the contained value from a Value
. Read more
sourceimpl GlibPtrDefault for Structure
impl GlibPtrDefault for Structure
type GlibType = *mut GstStructure
sourceimpl PartialEq<StructureRef> for Structure
impl PartialEq<StructureRef> for Structure
sourceimpl StaticType for Structure
impl StaticType for Structure
sourcefn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of Self
.
sourceimpl<'a> ToGlibPtr<'a, *const GstStructure> for Structure
impl<'a> ToGlibPtr<'a, *const GstStructure> for Structure
type Storage = &'a Structure
sourcefn to_glib_none(&'a self) -> Stash<'a, *const GstStructure, Self>
fn to_glib_none(&'a self) -> Stash<'a, *const GstStructure, Self>
Transfer: none. Read more
sourcefn to_glib_full(&self) -> *const GstStructure
fn to_glib_full(&self) -> *const GstStructure
Transfer: full. Read more
sourcefn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
sourceimpl<'a> ToGlibPtr<'a, *mut GstStructure> for Structure
impl<'a> ToGlibPtr<'a, *mut GstStructure> for Structure
type Storage = &'a Structure
sourcefn to_glib_none(&'a self) -> Stash<'a, *mut GstStructure, Self>
fn to_glib_none(&'a self) -> Stash<'a, *mut GstStructure, Self>
Transfer: none. Read more
sourcefn to_glib_full(&self) -> *mut GstStructure
fn to_glib_full(&self) -> *mut GstStructure
Transfer: full. Read more
sourcefn to_glib_container(&'a self) -> Stash<'a, P, Self>
fn to_glib_container(&'a self) -> Stash<'a, P, Self>
Transfer: container. Read more
sourceimpl<'a> ToGlibPtrMut<'a, *mut GstStructure> for Structure
impl<'a> ToGlibPtrMut<'a, *mut GstStructure> for Structure
type Storage = &'a mut Structure
sourcefn to_glib_none_mut(&'a mut self) -> StashMut<'_, *mut GstStructure, Self>
fn to_glib_none_mut(&'a mut self) -> StashMut<'_, *mut GstStructure, Self>
Transfer: none. Read more
sourceimpl ToValueOptional for Structure
impl ToValueOptional for Structure
sourcefn to_value_optional(s: Option<&Self>) -> Value
fn to_value_optional(s: Option<&Self>) -> Value
Convert an Option
to a Value
.
impl Eq for Structure
impl Send for Structure
impl Sync for Structure
impl ValueTypeOptional for Structure
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> StaticTypeExt for T where
T: StaticType,
impl<T> StaticTypeExt for T where
T: StaticType,
sourcefn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.
sourceimpl<T> ToClosureReturnValue for T where
T: ToValue,
impl<T> ToClosureReturnValue for T where
T: ToValue,
fn to_closure_return_value(&self) -> Option<Value>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
impl<T> ToSendValue for T where
T: Send + ToValue + ?Sized,
sourcefn to_send_value(&self) -> SendValue
fn to_send_value(&self) -> SendValue
Returns a SendValue
clone of self
.