Struct janus_plugin::jansson::JanssonValue
[−]
[src]
pub struct JanssonValue { /* fields omitted */ }
A safe wrapper for a Jansson JSON value. Automatically increases and decreases the refcount of the underlying value when cloned/dropped.
Methods
impl JanssonValue
[src]
unsafe fn new(ptr: *mut RawJanssonValue) -> Option<Self>
[src]
Creates a wrapper for the given Jansson value.
fn as_mut_ref(&self) -> &mut RawJanssonValue
[src]
Gets the reference backing this value without taking ownership.
fn into_raw(self) -> *mut RawJanssonValue
[src]
Transfers ownership of this value to this pointer. The consumer of the pointer is responsible for calling json_decref on it later.
fn from_str(
input: &str,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<Error + Send + Sync>>
[src]
input: &str,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<Error + Send + Sync>>
Decodes a JSON string slice into a Jansson value, returning an error if decoding fails.
fn from_cstr(
input: &CStr,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<Error + Send + Sync>>
[src]
input: &CStr,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<Error + Send + Sync>>
Decodes a JSON C-style string into a Jansson value, returning an error if decoding fails.
fn to_string(self, encoding_flags: JanssonEncodingFlags) -> String
[src]
Encodes this Jansson value as a JSON owned string.
fn to_libcstring(self, encoding_flags: JanssonEncodingFlags) -> LibcString
[src]
Encodes this Jansson value as a JSON owned C-style string.
Trait Implementations
impl Debug for JanssonValue
[src]
impl Deref for JanssonValue
[src]
type Target = RawJanssonValue
The resulting type after dereferencing.
fn deref(&self) -> &RawJanssonValue
[src]
Dereferences the value.
impl Clone for JanssonValue
[src]
fn clone(&self) -> Self
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more