Struct wireplumber::pw::Properties

source ·
pub struct Properties { /* private fields */ }
Expand description

GLib type: Shared boxed type with reference counted clone semantics.

Implementations§

source§

impl Properties

source

pub fn as_ptr(&self) -> *mut WpProperties

Return the inner pointer to the underlying C value.

source

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

Borrows the underlying C value.

source§

impl Properties

source

pub fn new() -> Properties

source

pub fn new_string(str: &str) -> Properties

source

pub fn add(&self, props: &Properties) -> i32

source

pub fn add_keys(&self, props: &Properties, keys: &[&str]) -> i32

source

pub fn copy(&self) -> Option<Properties>

source

pub fn ensure_unique_owner(self) -> Option<Properties>

source

pub fn get(&self, key: &str) -> Option<GString>

source

pub fn count(&self) -> u32

Available on crate feature v0_4_10 only.
source

pub fn matches(&self, other: &Properties) -> bool

source

pub fn set(&self, key: &str, value: Option<&str>) -> i32

source

pub fn sort(&self)

source

pub fn update(&self, props: &Properties) -> i32

source

pub fn update_keys(&self, props: &Properties, keys: &[&str]) -> i32

source

pub fn iterator_item_get_key(item: &Value) -> Option<GString>

source

pub fn iterator_item_get_value(item: &Value) -> Option<GString>

source§

impl Properties

source

pub fn new_clone(props: &Self) -> Properties

source

pub unsafe fn new_copy(props: &pw_properties) -> Properties

source

pub unsafe fn new_copy_dict(dict: &spa_dict) -> Properties

source

pub unsafe fn new_wrap(props: *const pw_properties) -> Properties

source

pub unsafe fn new_wrap_mut(props: *mut pw_properties) -> Properties

source

pub unsafe fn new_wrap_dict(dict: *const spa_dict) -> Properties

source

pub unsafe fn add_from_dict(&self, dict: &spa_dict) -> usize

source

pub fn peek_dict(&self) -> &spa_dict

source

pub fn to_pw_properties(&self) -> NonNull<pw_properties>

source

pub fn unref_and_take_pw_properties(self) -> NonNull<pw_properties>

source

pub unsafe fn update_from_dict(&self, dict: &spa_dict) -> usize

source

pub fn remove(&self, key: &str) -> bool

source

pub fn insert<V: ToPipewirePropertyString>(&self, key: &str, value: V)

source

pub fn iter( &self ) -> Map<ValueIterator<PropertiesItem>, fn(_: PropertiesItem) -> (String, String)>

source

pub fn items(&self) -> IntoValueIterator<PropertiesItem>

source

pub fn keys(&self) -> impl Iterator<Item = String>

source

pub fn values(&self) -> impl Iterator<Item = String>

Trait Implementations§

source§

impl Clone for Properties

source§

fn clone(&self) -> Self

Makes a clone of this shared reference.

This increments the strong reference count of the reference. Dropping the reference will decrement it again.

1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for Properties

source§

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

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

impl Default for Properties

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<K: AsRef<str>, V: ToPipewirePropertyString> Extend<(K, V)> for Properties

source§

fn extend<T: IntoIterator<Item = (K, V)>>(&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 From<Properties> for Value

source§

fn from(s: Properties) -> Self

Converts to this type from the input type.
source§

impl FromIterator<(String, String)> for Properties

source§

fn from_iter<T: IntoIterator<Item = (String, String)>>(iter: T) -> Self

Creates a value from an iterator. Read more
source§

impl HasParamSpec for Properties

§

type ParamSpec = ParamSpecBoxed

§

type SetValue = Properties

Preferred value to be used as setter for the associated ParamSpec.
§

type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, Properties>

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for Properties

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

§

type Item = (String, String)

The type of the elements being iterated over.
§

type IntoIter = Map<ValueIterator<PropertiesItem>, fn(_: PropertiesItem) -> <&'a Properties as IntoIterator>::Item>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl IntoIterator for Properties

§

type Item = (String, String)

The type of the elements being iterated over.
§

type IntoIter = Map<ValueIterator<PropertiesItem>, fn(_: PropertiesItem) -> <Properties as IntoIterator>::Item>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl Ord for Properties

source§

fn cmp(&self, other: &Properties) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Properties

source§

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

source§

fn partial_cmp(&self, other: &Properties) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

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

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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 more
1.0.0 · source§

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

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl StaticType for Properties

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl Eq for Properties

source§

impl StructuralPartialEq for Properties

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> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *const GSList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GList> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GPtrArray> for T

source§

impl<T> FromGlibPtrArrayContainerAsVec<<T as GlibPtrDefault>::GlibType, *mut GSList> for T

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> IntoClosureReturnValue for T
where T: Into<Value>,

source§

impl<T> Property for T
where T: HasParamSpec,

§

type Value = T

source§

impl<T> PropertyGet for T
where T: HasParamSpec,

§

type Value = T

source§

fn get<R, F>(&self, f: F) -> R
where F: Fn(&<T as PropertyGet>::Value) -> R,

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> 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> ToValueOption for T
where T: ToValue,

source§

impl<T> TransparentType for T

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> TryFromClosureReturnValue for T
where T: for<'a> FromValue<'a> + StaticType + 'static,

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<'a, T, C, E> FromValueOptional<'a> for T
where T: FromValue<'a, Checker = C>, C: ValueTypeChecker<Error = ValueTypeMismatchOrNoneError<E>>, E: Error + Send + 'static,