Struct wireplumber::spa::json::SpaJsonObjectBuilder
source · pub struct SpaJsonObjectBuilder { /* private fields */ }
Implementations§
source§impl SpaJsonObjectBuilder
impl SpaJsonObjectBuilder
pub fn new() -> Self
pub fn with_builder(builder: SpaJsonBuilder) -> Self
pub fn with_builder_ref(builder: &SpaJsonBuilder) -> &Self
pub fn with_builder_mut(builder: &mut SpaJsonBuilder) -> &mut Self
pub fn into_inner(self) -> SpaJsonBuilder
pub const fn inner_ref(&self) -> &SpaJsonBuilder
pub fn inner_mut(&mut self) -> &mut SpaJsonBuilder
pub fn add_entry<K: AsRef<str>, T>(&mut self, key: K, value: T)where
SpaJsonBuilder: Extend<T>,
pub fn end(&self) -> SpaJson
Methods from Deref<Target = SpaJsonBuilder>§
sourcepub fn as_ptr(&self) -> *mut WpSpaJsonBuilder
Available on crate feature v0_4_8
only.
pub fn as_ptr(&self) -> *mut WpSpaJsonBuilder
v0_4_8
only.Return the inner pointer to the underlying C value.
pub fn add_boolean(&self, value: bool)
Available on crate feature
v0_4_8
only.pub fn add_float(&self, value: f32)
Available on crate feature
v0_4_8
only.pub fn add_int(&self, value: i32)
Available on crate feature
v0_4_8
only.pub fn add_null(&self)
Available on crate feature
v0_4_8
only.pub fn add_property(&self, key: &str)
Available on crate feature
v0_4_8
only.pub fn add_string(&self, value: &str)
Available on crate feature
v0_4_8
only.pub fn end(&self) -> SpaJson
Available on crate feature
v0_4_8
only.pub fn add_json<'j, J: AsRef<SpaJsonRef<'j>>>(&self, json: J)
pub fn add<T>(&mut self, value: T)where
Self: Extend<T>,
pub fn add_nullable<T>(&mut self, value: Option<T>)where
Self: Extend<T>,
Trait Implementations§
source§impl Clone for SpaJsonObjectBuilder
impl Clone for SpaJsonObjectBuilder
source§fn clone(&self) -> SpaJsonObjectBuilder
fn clone(&self) -> SpaJsonObjectBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Default for SpaJsonObjectBuilder
impl Default for SpaJsonObjectBuilder
source§impl Deref for SpaJsonObjectBuilder
impl Deref for SpaJsonObjectBuilder
source§impl DerefMut for SpaJsonObjectBuilder
impl DerefMut for SpaJsonObjectBuilder
source§impl<'de> Deserialize<'de> for SpaJsonObjectBuilder
Available on crate feature experimental
only.
impl<'de> Deserialize<'de> for SpaJsonObjectBuilder
Available on crate feature
experimental
only.source§fn 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
source§impl<'j, K: AsRef<str>, T> Extend<(K, T)> for SpaJsonObjectBuilderwhere
SpaJsonBuilder: Extend<T>,
impl<'j, K: AsRef<str>, T> Extend<(K, T)> for SpaJsonObjectBuilderwhere
SpaJsonBuilder: Extend<T>,
source§fn extend<I: IntoIterator<Item = (K, T)>>(&mut self, iter: I)
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)
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)
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 SpaJsonObjectBuilderwhere
Self: Extend<T>,
impl<T> FromIterator<T> for SpaJsonObjectBuilderwhere
Self: Extend<T>,
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 Hash for SpaJsonObjectBuilder
impl Hash for SpaJsonObjectBuilder
source§impl Ord for SpaJsonObjectBuilder
impl Ord for SpaJsonObjectBuilder
source§fn cmp(&self, other: &SpaJsonObjectBuilder) -> Ordering
fn cmp(&self, other: &SpaJsonObjectBuilder) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for SpaJsonObjectBuilder
impl PartialEq for SpaJsonObjectBuilder
source§fn eq(&self, other: &SpaJsonObjectBuilder) -> bool
fn eq(&self, other: &SpaJsonObjectBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SpaJsonObjectBuilder
impl PartialOrd for SpaJsonObjectBuilder
source§fn partial_cmp(&self, other: &SpaJsonObjectBuilder) -> Option<Ordering>
fn partial_cmp(&self, other: &SpaJsonObjectBuilder) -> Option<Ordering>
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 SerializeMap for SpaJsonObjectBuilder
impl SerializeMap for SpaJsonObjectBuilder
§type Error = BuildError
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>
fn serialize_key<T: ?Sized + Serialize>( &mut self, key: &T ) -> Result<(), Self::Error>
Serialize a map key. Read more
source§impl SerializeStruct for SpaJsonObjectBuilderwhere
Self: SerializeMap,
impl SerializeStruct for SpaJsonObjectBuilderwhere
Self: SerializeMap,
§type Ok = <SpaJsonObjectBuilder as SerializeMap>::Ok
type Ok = <SpaJsonObjectBuilder as SerializeMap>::Ok
Must match the
Ok
type of our Serializer
.§type Error = <SpaJsonObjectBuilder as SerializeMap>::Error
type Error = <SpaJsonObjectBuilder as SerializeMap>::Error
Must match the
Error
type of our Serializer
.impl Eq for SpaJsonObjectBuilder
impl StructuralPartialEq for SpaJsonObjectBuilder
Auto Trait Implementations§
impl Freeze for SpaJsonObjectBuilder
impl RefUnwindSafe for SpaJsonObjectBuilder
impl !Send for SpaJsonObjectBuilder
impl !Sync for SpaJsonObjectBuilder
impl Unpin for SpaJsonObjectBuilder
impl UnwindSafe for SpaJsonObjectBuilder
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