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

source

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

Return the inner pointer to the underlying C value.

source

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

Borrows the underlying C value.

source§

impl SpaJsonParser

source

pub unsafe fn new_array_unchecked(json: &SpaJson) -> SpaJsonParser

source

pub unsafe fn new_object_unchecked(json: &SpaJson) -> SpaJsonParser

source

pub fn end(&self)

source

pub fn boolean(&self) -> Option<bool>

source

pub fn float(&self) -> Option<f32>

source

pub fn int(&self) -> Option<i32>

source

pub fn null(&self) -> bool

source

pub fn string(&self) -> Option<GString>

source§

impl SpaJsonParser

source

pub fn new_object(json: &SpaJson) -> SpaJsonParserRef<'_, '_>

source

pub fn new_array(json: &SpaJson) -> SpaJsonParserRef<'_, '_>

source

pub fn parse_json(&self) -> Option<SpaJsonRef<'_>>

source

pub unsafe fn json_unchecked(&self) -> Option<SpaJson>

Gets the SpaJson value from a spa json parser object

§Safety

The returned object borrows the underlying parser’s data, which is not tracked by a lifetime.

source

pub fn json(&self) -> Option<SpaJson>

source

pub fn parse_end(self) -> Result<(), ParseError>

Trait Implementations§

source§

impl Clone for SpaJsonParser

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 SpaJsonParser

source§

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

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

impl<'de> EnumAccess<'de> for &mut SpaJsonParser

§

type Error = ParseError

The error type that can be returned if some error occurs during deserialization.
§

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>

variant is called to identify which variant to deserialize. Read more
source§

fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error>
where V: Deserialize<'de>,

variant is called to identify which variant to deserialize. Read more
source§

impl<'de> EnumAccess<'de> for SpaJsonParser

§

type Error = ParseError

The error type that can be returned if some error occurs during deserialization.
§

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>

variant is called to identify which variant to deserialize. Read more
source§

fn variant<V>(self) -> Result<(V, Self::Variant), Self::Error>
where V: Deserialize<'de>,

variant is called to identify which variant to deserialize. Read more
source§

impl From<SpaJsonParser> for Value

source§

fn from(s: SpaJsonParser) -> Self

Converts to this type from the input type.
source§

impl HasParamSpec for SpaJsonParser

§

type ParamSpec = ParamSpecBoxed

§

type SetValue = SpaJsonParser

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

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

source§

fn param_spec_builder() -> Self::BuilderFn

source§

impl Hash for SpaJsonParser

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<'de> MapAccess<'de> for &mut SpaJsonParser

§

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>

This returns Ok(Some(key)) for the next key in the map, or Ok(None) if there are no more remaining entries. Read more
source§

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

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

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

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

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

fn size_hint(&self) -> Option<usize>

Returns the number of entries remaining in the map, if known.
source§

impl Ord for SpaJsonParser

source§

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

source§

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

source§

fn partial_cmp(&self, other: &SpaJsonParser) -> 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<'de> SeqAccess<'de> for &mut SpaJsonParser

This parser cannot borrow data, use a SpaJsonParserRef instead if possible!

§

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>

This returns Ok(Some(value)) for the next value in the sequence, or Ok(None) if there are no more remaining items. Read more
source§

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

fn size_hint(&self) -> Option<usize>

Returns the number of elements remaining in the sequence, if known.
source§

impl StaticType for SpaJsonParser

source§

fn static_type() -> Type

Returns the type identifier of Self.
source§

impl<'de> VariantAccess<'de> for &mut SpaJsonParser

§

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>

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>

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>

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>

Called when deserializing a struct-like variant. Read more
source§

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

§

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>

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>

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>

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>

Called when deserializing a struct-like variant. Read more
source§

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 Eq for SpaJsonParser

source§

impl StructuralPartialEq for SpaJsonParser

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,