Struct wireplumber::spa::json::SpaJsonParser
source · pub struct SpaJsonParser { /* private fields */ }
Available on crate feature
v0_4_8
only.Expand description
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
source§impl SpaJsonParser
impl SpaJsonParser
sourcepub fn as_ptr(&self) -> *mut WpSpaJsonParser
pub fn as_ptr(&self) -> *mut WpSpaJsonParser
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow<'a>(
ptr: *const *const WpSpaJsonParser
) -> &'a Self
pub unsafe fn from_glib_ptr_borrow<'a>( ptr: *const *const WpSpaJsonParser ) -> &'a Self
Borrows the underlying C value.
source§impl SpaJsonParser
impl SpaJsonParser
pub unsafe fn new_array_unchecked(json: &SpaJson) -> SpaJsonParser
pub unsafe fn new_object_unchecked(json: &SpaJson) -> SpaJsonParser
pub fn end(&self)
pub fn boolean(&self) -> Option<bool>
pub fn float(&self) -> Option<f32>
pub fn int(&self) -> Option<i32>
pub fn null(&self) -> bool
pub fn string(&self) -> Option<GString>
source§impl SpaJsonParser
impl SpaJsonParser
pub fn new_object(json: &SpaJson) -> SpaJsonParserRef<'_, '_> ⓘ
pub fn new_array(json: &SpaJson) -> SpaJsonParserRef<'_, '_> ⓘ
pub fn parse_json(&self) -> Option<SpaJsonRef<'_>>
sourcepub unsafe fn json_unchecked(&self) -> Option<SpaJson>
pub unsafe fn json_unchecked(&self) -> Option<SpaJson>
pub fn json(&self) -> Option<SpaJson>
pub fn parse_end(self) -> Result<(), ParseError>
Trait Implementations§
source§impl Clone for SpaJsonParser
impl Clone for SpaJsonParser
source§impl Debug for SpaJsonParser
impl Debug for SpaJsonParser
source§impl<'de> EnumAccess<'de> for &mut SpaJsonParser
impl<'de> EnumAccess<'de> for &mut SpaJsonParser
§type Error = ParseError
type Error = ParseError
The error type that can be returned if some error occurs during
deserialization.
§type Variant = &mut SpaJsonParser
type Variant = &mut SpaJsonParser
The
Visitor
that will be used to deserialize the content of the enum
variant.source§fn variant_seed<V: DeserializeSeed<'de>>(
self,
seed: V
) -> Result<(V::Value, Self::Variant), Self::Error>
fn variant_seed<V: DeserializeSeed<'de>>( self, seed: V ) -> Result<(V::Value, Self::Variant), Self::Error>
variant
is called to identify which variant to deserialize. Read moresource§impl<'de> EnumAccess<'de> for SpaJsonParser
impl<'de> EnumAccess<'de> for SpaJsonParser
§type Error = ParseError
type Error = ParseError
The error type that can be returned if some error occurs during
deserialization.
§type Variant = SpaJsonParser
type Variant = SpaJsonParser
The
Visitor
that will be used to deserialize the content of the enum
variant.source§fn variant_seed<V: DeserializeSeed<'de>>(
self,
seed: V
) -> Result<(V::Value, Self::Variant), Self::Error>
fn variant_seed<V: DeserializeSeed<'de>>( self, seed: V ) -> Result<(V::Value, Self::Variant), Self::Error>
variant
is called to identify which variant to deserialize. Read moresource§impl From<SpaJsonParser> for Value
impl From<SpaJsonParser> for Value
source§fn from(s: SpaJsonParser) -> Self
fn from(s: SpaJsonParser) -> Self
Converts to this type from the input type.
source§impl HasParamSpec for SpaJsonParser
impl HasParamSpec for SpaJsonParser
type ParamSpec = ParamSpecBoxed
§type SetValue = SpaJsonParser
type SetValue = SpaJsonParser
Preferred value to be used as setter for the associated ParamSpec.
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, SpaJsonParser>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for SpaJsonParser
impl Hash for SpaJsonParser
source§impl<'de> MapAccess<'de> for &mut SpaJsonParser
impl<'de> MapAccess<'de> for &mut SpaJsonParser
§type Error = ParseError
type Error = ParseError
The error type that can be returned if some error occurs during
deserialization.
source§fn next_key_seed<K: DeserializeSeed<'de>>(
&mut self,
seed: K
) -> Result<Option<K::Value>, Self::Error>
fn next_key_seed<K: DeserializeSeed<'de>>( &mut self, seed: K ) -> Result<Option<K::Value>, Self::Error>
This returns
Ok(Some(key))
for the next key in the map, or Ok(None)
if there are no more remaining entries. Read moresource§fn next_value_seed<V: DeserializeSeed<'de>>(
&mut self,
seed: V
) -> Result<V::Value, Self::Error>
fn next_value_seed<V: DeserializeSeed<'de>>( &mut self, seed: V ) -> Result<V::Value, Self::Error>
This returns a
Ok(value)
for the next value in the map. Read moresource§fn next_entry_seed<K, V>(
&mut self,
kseed: K,
vseed: V
) -> Result<Option<(<K as DeserializeSeed<'de>>::Value, <V as DeserializeSeed<'de>>::Value)>, Self::Error>where
K: DeserializeSeed<'de>,
V: DeserializeSeed<'de>,
fn next_entry_seed<K, V>(
&mut self,
kseed: K,
vseed: V
) -> Result<Option<(<K as DeserializeSeed<'de>>::Value, <V as DeserializeSeed<'de>>::Value)>, Self::Error>where
K: DeserializeSeed<'de>,
V: DeserializeSeed<'de>,
This returns
Ok(Some((key, value)))
for the next (key-value) pair in
the map, or Ok(None)
if there are no more remaining items. Read moresource§fn next_key<K>(&mut self) -> Result<Option<K>, Self::Error>where
K: Deserialize<'de>,
fn next_key<K>(&mut self) -> Result<Option<K>, Self::Error>where
K: Deserialize<'de>,
This returns
Ok(Some(key))
for the next key in the map, or Ok(None)
if there are no more remaining entries. Read moresource§fn next_value<V>(&mut self) -> Result<V, Self::Error>where
V: Deserialize<'de>,
fn next_value<V>(&mut self) -> Result<V, Self::Error>where
V: Deserialize<'de>,
This returns a
Ok(value)
for the next value in the map. Read moresource§fn next_entry<K, V>(&mut self) -> Result<Option<(K, V)>, Self::Error>where
K: Deserialize<'de>,
V: Deserialize<'de>,
fn next_entry<K, V>(&mut self) -> Result<Option<(K, V)>, Self::Error>where
K: Deserialize<'de>,
V: Deserialize<'de>,
This returns
Ok(Some((key, value)))
for the next (key-value) pair in
the map, or Ok(None)
if there are no more remaining items. Read moresource§impl Ord for SpaJsonParser
impl Ord for SpaJsonParser
source§fn cmp(&self, other: &SpaJsonParser) -> Ordering
fn cmp(&self, other: &SpaJsonParser) -> 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 SpaJsonParser
impl PartialEq for SpaJsonParser
source§fn eq(&self, other: &SpaJsonParser) -> bool
fn eq(&self, other: &SpaJsonParser) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SpaJsonParser
impl PartialOrd for SpaJsonParser
source§fn partial_cmp(&self, other: &SpaJsonParser) -> Option<Ordering>
fn partial_cmp(&self, other: &SpaJsonParser) -> 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<'de> SeqAccess<'de> for &mut SpaJsonParser
impl<'de> SeqAccess<'de> for &mut SpaJsonParser
This parser cannot borrow data, use a SpaJsonParserRef instead if possible!
§type Error = ParseError
type Error = ParseError
The error type that can be returned if some error occurs during
deserialization.
source§fn next_element_seed<T: DeserializeSeed<'de>>(
&mut self,
seed: T
) -> Result<Option<T::Value>, Self::Error>
fn next_element_seed<T: DeserializeSeed<'de>>( &mut self, seed: T ) -> Result<Option<T::Value>, Self::Error>
This returns
Ok(Some(value))
for the next value in the sequence, or
Ok(None)
if there are no more remaining items. Read moresource§fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error>where
T: Deserialize<'de>,
fn next_element<T>(&mut self) -> Result<Option<T>, Self::Error>where
T: Deserialize<'de>,
This returns
Ok(Some(value))
for the next value in the sequence, or
Ok(None)
if there are no more remaining items. Read moresource§impl StaticType for SpaJsonParser
impl StaticType for SpaJsonParser
source§fn static_type() -> Type
fn static_type() -> Type
Returns the type identifier of
Self
.source§impl<'de> VariantAccess<'de> for &mut SpaJsonParser
impl<'de> VariantAccess<'de> for &mut SpaJsonParser
§type Error = ParseError
type Error = ParseError
The error type that can be returned if some error occurs during
deserialization. Must match the error type of our
EnumAccess
.source§fn unit_variant(self) -> Result<(), Self::Error>
fn unit_variant(self) -> Result<(), Self::Error>
Called when deserializing a variant with no values. Read more
source§fn newtype_variant_seed<T: DeserializeSeed<'de>>(
self,
seed: T
) -> Result<T::Value, Self::Error>
fn newtype_variant_seed<T: DeserializeSeed<'de>>( self, seed: T ) -> Result<T::Value, Self::Error>
Called when deserializing a variant with a single value. Read more
source§fn tuple_variant<V: Visitor<'de>>(
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
fn tuple_variant<V: Visitor<'de>>( self, len: usize, visitor: V ) -> Result<V::Value, Self::Error>
Called when deserializing a tuple-like variant. Read more
source§fn struct_variant<V: Visitor<'de>>(
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
fn struct_variant<V: Visitor<'de>>( self, fields: &'static [&'static str], visitor: V ) -> Result<V::Value, Self::Error>
Called when deserializing a struct-like variant. Read more
source§fn newtype_variant<T>(self) -> Result<T, Self::Error>where
T: Deserialize<'de>,
fn newtype_variant<T>(self) -> Result<T, Self::Error>where
T: Deserialize<'de>,
Called when deserializing a variant with a single value. Read more
source§impl<'de> VariantAccess<'de> for SpaJsonParser
impl<'de> VariantAccess<'de> for SpaJsonParser
§type Error = ParseError
type Error = ParseError
The error type that can be returned if some error occurs during
deserialization. Must match the error type of our
EnumAccess
.source§fn unit_variant(self) -> Result<(), Self::Error>
fn unit_variant(self) -> Result<(), Self::Error>
Called when deserializing a variant with no values. Read more
source§fn newtype_variant_seed<T: DeserializeSeed<'de>>(
self,
seed: T
) -> Result<T::Value, Self::Error>
fn newtype_variant_seed<T: DeserializeSeed<'de>>( self, seed: T ) -> Result<T::Value, Self::Error>
Called when deserializing a variant with a single value. Read more
source§fn tuple_variant<V: Visitor<'de>>(
self,
len: usize,
visitor: V
) -> Result<V::Value, Self::Error>
fn tuple_variant<V: Visitor<'de>>( self, len: usize, visitor: V ) -> Result<V::Value, Self::Error>
Called when deserializing a tuple-like variant. Read more
source§fn struct_variant<V: Visitor<'de>>(
self,
fields: &'static [&'static str],
visitor: V
) -> Result<V::Value, Self::Error>
fn struct_variant<V: Visitor<'de>>( self, fields: &'static [&'static str], visitor: V ) -> Result<V::Value, Self::Error>
Called when deserializing a struct-like variant. Read more
source§fn newtype_variant<T>(self) -> Result<T, Self::Error>where
T: Deserialize<'de>,
fn newtype_variant<T>(self) -> Result<T, Self::Error>where
T: Deserialize<'de>,
Called when deserializing a variant with a single value. Read more
impl Eq for SpaJsonParser
impl StructuralPartialEq for SpaJsonParser
Auto Trait Implementations§
impl Freeze for SpaJsonParser
impl RefUnwindSafe for SpaJsonParser
impl !Send for SpaJsonParser
impl !Sync for SpaJsonParser
impl Unpin for SpaJsonParser
impl UnwindSafe for SpaJsonParser
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.