Struct wireplumber::spa::SpaPod
source · pub struct SpaPod { /* private fields */ }
Expand description
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
source§impl SpaPod
impl SpaPod
pub fn new_boolean(value: bool) -> SpaPod
pub fn new_double(value: f64) -> SpaPod
pub fn new_fd(value: i64) -> SpaPod
pub fn new_float(value: f32) -> SpaPod
pub fn new_fraction(num: u32, denom: u32) -> SpaPod
pub fn new_id(value: u32) -> SpaPod
pub fn new_int(value: i32) -> SpaPod
pub fn new_long(value: i64) -> SpaPod
pub fn new_none() -> SpaPod
pub fn new_rectangle(width: u32, height: u32) -> SpaPod
pub fn new_string(value: &str) -> SpaPod
pub fn copy(&self) -> Option<SpaPod>
pub fn ensure_unique_owner(self) -> Option<SpaPod>
pub fn filter(&self, filter: &SpaPod) -> Option<SpaPod>
pub fn fixate(&self) -> bool
pub fn array_child(&self) -> Option<SpaPod>
pub fn boolean(&self) -> Option<bool>
pub fn choice_child(&self) -> Option<SpaPod>
pub fn control(&self) -> Option<(u32, GString, SpaPod)>
pub fn double(&self) -> Option<f64>
pub fn fd(&self) -> Option<i64>
pub fn float(&self) -> Option<f32>
pub fn fraction(&self) -> Option<(u32, u32)>
pub fn id(&self) -> Option<u32>
pub fn int(&self) -> Option<i32>
pub fn long(&self) -> Option<i64>
pub fn property(&self) -> Option<(GString, SpaPod)>
pub fn rectangle(&self) -> Option<(u32, u32)>
pub fn string(&self) -> Option<GString>
pub fn is_array(&self) -> bool
pub fn is_boolean(&self) -> bool
pub fn is_bytes(&self) -> bool
pub fn is_choice(&self) -> bool
pub fn is_control(&self) -> bool
pub fn is_double(&self) -> bool
pub fn is_fd(&self) -> bool
pub fn is_float(&self) -> bool
pub fn is_fraction(&self) -> bool
pub fn is_id(&self) -> bool
pub fn is_int(&self) -> bool
pub fn is_long(&self) -> bool
pub fn is_none(&self) -> bool
pub fn is_object(&self) -> bool
pub fn is_pointer(&self) -> bool
pub fn is_property(&self) -> bool
pub fn is_rectangle(&self) -> bool
pub fn is_sequence(&self) -> bool
pub fn is_string(&self) -> bool
pub fn is_struct(&self) -> bool
pub fn is_unique_owner(&self) -> bool
pub fn set_boolean(&self, value: bool) -> bool
pub fn set_double(&self, value: f64) -> bool
pub fn set_fd(&self, value: i64) -> bool
pub fn set_float(&self, value: f32) -> bool
pub fn set_fraction(&self, num: u32, denom: u32) -> bool
pub fn set_id(&self, value: u32) -> bool
pub fn set_int(&self, value: i32) -> bool
pub fn set_long(&self, value: i64) -> bool
pub fn set_pod(&self, pod: &SpaPod) -> bool
pub fn set_rectangle(&self, width: u32, height: u32) -> bool
source§impl SpaPod
impl SpaPod
pub fn spa_id(&self) -> Option<Id>
Available on crate feature
libspa
only.pub fn spa_fd(&self) -> Option<Fd>
Available on crate feature
libspa
only.pub fn deserialize<'de, P: PodDeserialize<'de>>( &'de self ) -> Result<P, DeserializeError<&'de [u8]>>
Available on crate feature
libspa
only.pub fn serialize<P: PodSerialize>(value: &P) -> Result<Self, GenError>
Available on crate feature
libspa
only.pub fn to_pod_value(&self) -> Result<Value, Error>
Available on crate feature
libspa
only.pub fn debug(&self) -> DebugValue<'static, 'static>
source§impl SpaPod
impl SpaPod
sourcepub unsafe fn with_pod_unchecked(bytes: &[u8]) -> Self
pub unsafe fn with_pod_unchecked(bytes: &[u8]) -> Self
§Safety
Does not tie lifetime of bytes
to Self, so requires caller guarantee
sourcepub unsafe fn with_pod_mut_unchecked(bytes: &mut [u8]) -> Self
pub unsafe fn with_pod_mut_unchecked(bytes: &mut [u8]) -> Self
§Safety
Does not tie lifetime of bytes
to Self, so requires caller guarantee
pub fn with_copy(pod: &SpaPod) -> Self
pub fn with_pod(bytes: &[u8]) -> Self
pub unsafe fn as_bytes(&self) -> &[u8] ⓘ
pub fn to_bytes(&self) -> Vec<u8>
sourcepub unsafe fn new_wrap_raw_mut(pod: *mut spa_pod) -> SpaPod
pub unsafe fn new_wrap_raw_mut(pod: *mut spa_pod) -> SpaPod
borrows pod for the lifetime of the returned object
sourcepub unsafe fn new_wrap_raw_const(pod: *const spa_pod) -> SpaPod
pub unsafe fn new_wrap_raw_const(pod: *const spa_pod) -> SpaPod
borrows pod for the lifetime of the returned object
pub fn new_bytes(value: &[u8]) -> SpaPod
pub fn new_pointer(type_name: &str, value: gconstpointer) -> SpaPod
pub fn spa_type(&self) -> Option<SpaType>
pub fn bytes(&self) -> Option<&[u8]>
pub fn choice_type(&self) -> Option<SpaIdValue>
pub fn pointer(&self) -> Option<gconstpointer>
pub fn set_pointer(&self, type_name: &str, value: gconstpointer) -> bool
pub fn iterator(&self) -> IntoValueIterator<SpaPod>
pub fn array_pointers(&self) -> IntoValueIterator<Pointer>
pub fn array_iterator<T: SpaPrimitive>(&self) -> impl Iterator<Item = T>
pub fn spa_pod_raw(&self) -> &spa_pod
pub fn spa_rectangle(&self) -> Option<spa_rectangle>
pub fn spa_fraction(&self) -> Option<spa_fraction>
pub fn struct_fields( &self, length_prefix: bool ) -> Result<IntoIter<(String, SpaPod)>>
Available on crate feature
experimental
only.pub fn spa_properties( &self ) -> impl Iterator<Item = (Result<SpaIdValue, WpSpaType>, SpaPod)>
pub fn find_spa_property<K: SpaPropertyKey>(&self, key: &K) -> Option<SpaPod>
pub fn spa_property<T, K: SpaPropertyKey>(&self, key: &K) -> Option<T>
pub fn set_spa_property<K: SpaPropertyKey>( &self, key: &K, value: &SpaPod ) -> Option<SpaPod>
pub fn apply<O: IsA<PipewireObject>>(self, obj: &O) -> Result<()>
Available on crate feature
experimental
only.Trait Implementations§
source§impl<T: SpaValue> FromIterator<T> for SpaPod
impl<T: SpaValue> FromIterator<T> for SpaPod
source§fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self
Creates a value from an iterator. Read more
source§impl HasParamSpec for SpaPod
impl HasParamSpec for SpaPod
source§impl Ord for SpaPod
impl Ord for SpaPod
source§impl PartialEq for SpaPod
impl PartialEq for SpaPod
source§impl PartialOrd for SpaPod
impl PartialOrd for SpaPod
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SpaValue for SpaPod
impl SpaValue for SpaPod
fn add_to_builder(&self, builder: &SpaPodBuilder)
type Owned = SpaPod
source§impl StaticType for SpaPod
impl StaticType for SpaPod
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.source§impl<'a> TryFrom<&'a SpaPod> for spa_fraction
impl<'a> TryFrom<&'a SpaPod> for spa_fraction
source§impl<'a> TryFrom<&'a SpaPod> for spa_rectangle
impl<'a> TryFrom<&'a SpaPod> for spa_rectangle
impl Eq for SpaPod
Auto Trait Implementations§
impl Freeze for SpaPod
impl RefUnwindSafe for SpaPod
impl !Send for SpaPod
impl !Sync for SpaPod
impl Unpin for SpaPod
impl UnwindSafe for SpaPod
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for Twhere
T: GlibPtrDefault + FromGlibPtrNone<<T as GlibPtrDefault>::GlibType> + FromGlibPtrFull<<T as GlibPtrDefault>::GlibType>,
source§impl<T> IntoClosureReturnValue for T
impl<T> IntoClosureReturnValue for T
fn into_closure_return_value(self) -> Option<Value>
source§impl<T> PropertyGet for Twhere
T: HasParamSpec,
impl<T> PropertyGet for Twhere
T: HasParamSpec,
source§impl<T> StaticTypeExt for Twhere
T: StaticType,
impl<T> StaticTypeExt for Twhere
T: StaticType,
source§fn ensure_type()
fn ensure_type()
Ensures that the type has been registered with the type system.