Struct wireplumber::spa::json::SpaJsonObjectBuilder

source ·
pub struct SpaJsonObjectBuilder { /* private fields */ }

Implementations§

source§

impl SpaJsonObjectBuilder

source

pub fn new() -> Self

source

pub fn with_builder(builder: SpaJsonBuilder) -> Self

source

pub fn with_builder_ref(builder: &SpaJsonBuilder) -> &Self

source

pub fn with_builder_mut(builder: &mut SpaJsonBuilder) -> &mut Self

source

pub fn into_inner(self) -> SpaJsonBuilder

source

pub const fn inner_ref(&self) -> &SpaJsonBuilder

source

pub fn inner_mut(&mut self) -> &mut SpaJsonBuilder

source

pub fn add_entry<K: AsRef<str>, T>(&mut self, key: K, value: T)

source

pub fn end(&self) -> SpaJson

Methods from Deref<Target = SpaJsonBuilder>§

source

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

Available on crate feature v0_4_8 only.

Return the inner pointer to the underlying C value.

source

pub fn add_boolean(&self, value: bool)

Available on crate feature v0_4_8 only.
source

pub fn add_float(&self, value: f32)

Available on crate feature v0_4_8 only.
source

pub fn add_int(&self, value: i32)

Available on crate feature v0_4_8 only.
source

pub fn add_null(&self)

Available on crate feature v0_4_8 only.
source

pub fn add_property(&self, key: &str)

Available on crate feature v0_4_8 only.
source

pub fn add_string(&self, value: &str)

Available on crate feature v0_4_8 only.
source

pub fn end(&self) -> SpaJson

Available on crate feature v0_4_8 only.
source

pub fn add_json<'j, J: AsRef<SpaJsonRef<'j>>>(&self, json: J)

source

pub fn add<T>(&mut self, value: T)
where Self: Extend<T>,

source

pub fn add_nullable<T>(&mut self, value: Option<T>)
where Self: Extend<T>,

Trait Implementations§

source§

impl Clone for SpaJsonObjectBuilder

source§

fn clone(&self) -> SpaJsonObjectBuilder

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Default for SpaJsonObjectBuilder

source§

fn default() -> Self

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

impl Deref for SpaJsonObjectBuilder

§

type Target = SpaJsonBuilder

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for SpaJsonObjectBuilder

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for SpaJsonObjectBuilder

Available on crate feature experimental only.
source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
source§

impl<'j, K: AsRef<str>, T> Extend<(K, T)> for SpaJsonObjectBuilder

source§

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

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<T> FromIterator<T> for SpaJsonObjectBuilder
where Self: Extend<T>,

source§

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

Creates a value from an iterator. Read more
source§

impl Hash for SpaJsonObjectBuilder

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 Ord for SpaJsonObjectBuilder

source§

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

source§

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

source§

fn partial_cmp(&self, other: &SpaJsonObjectBuilder) -> 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 SerializeMap for SpaJsonObjectBuilder

§

type Ok = SpaJson

Must match the Ok type of our Serializer.
§

type Error = BuildError

Must match the Error type of our Serializer.
source§

fn serialize_key<T: ?Sized + Serialize>( &mut self, key: &T ) -> Result<(), Self::Error>

Serialize a map key. Read more
source§

fn serialize_value<T: ?Sized + Serialize>( &mut self, value: &T ) -> Result<(), Self::Error>

Serialize a map value. Read more
source§

fn end(self) -> Result<Self::Ok, Self::Error>

Finish serializing a map.
source§

fn serialize_entry<K, V>( &mut self, key: &K, value: &V ) -> Result<(), Self::Error>
where K: Serialize + ?Sized, V: Serialize + ?Sized,

Serialize a map entry consisting of a key and a value. Read more
source§

impl SerializeStruct for SpaJsonObjectBuilder
where Self: SerializeMap,

§

type Ok = <SpaJsonObjectBuilder as SerializeMap>::Ok

Must match the Ok type of our Serializer.
§

type Error = <SpaJsonObjectBuilder as SerializeMap>::Error

Must match the Error type of our Serializer.
source§

fn serialize_field<T: ?Sized + Serialize>( &mut self, key: &'static str, value: &T ) -> Result<(), Self::Error>

Serialize a struct field.
source§

fn end(self) -> Result<Self::Ok, Self::Error>

Finish serializing a struct.
source§

fn skip_field(&mut self, key: &'static str) -> Result<(), Self::Error>

Indicate that a struct field has been skipped. Read more
source§

impl Eq for SpaJsonObjectBuilder

source§

impl StructuralPartialEq for SpaJsonObjectBuilder

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> 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, 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.
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,