[−][src]Struct janus_plugin::jansson::JanssonValue
A safe wrapper for a Jansson JSON value. Automatically increases and decreases the refcount of the underlying value when cloned/dropped.
Implementations
impl JanssonValue
[src]
pub unsafe fn from_and_incref(ptr: *mut RawJanssonValue) -> Option<Self>
[src]
Creates a JanssonValue
owning the given raw pointer, incrementing the reference count.
pub unsafe fn from_raw(ptr: *mut RawJanssonValue) -> Option<Self>
[src]
Creates a JanssonValue
owning the given raw pointer. Does not increment the reference count, but the
JanssonValue
's destructor will decrement the reference count.
pub 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.
pub fn as_mut_ref(&mut self) -> &mut RawJanssonValue
[src]
Gets the reference backing this value without taking ownership.
pub fn from_str(
input: &str,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<dyn Error + Send + Sync>>
[src]
input: &str,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<dyn Error + Send + Sync>>
Decodes a JSON string slice into a Jansson value, returning an error if decoding fails.
pub fn from_cstr(
input: &CStr,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<dyn Error + Send + Sync>>
[src]
input: &CStr,
decoding_flags: JanssonDecodingFlags
) -> Result<Self, Box<dyn Error + Send + Sync>>
Decodes a JSON C-style string into a Jansson value, returning an error if decoding fails.
pub fn to_libcstring(&self, encoding_flags: JanssonEncodingFlags) -> LibcString
[src]
Encodes this Jansson value as a JSON owned C-style string.
Trait Implementations
impl Clone for JanssonValue
[src]
fn clone(&self) -> Self
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for JanssonValue
[src]
impl Deref for JanssonValue
[src]
type Target = RawJanssonValue
The resulting type after dereferencing.
fn deref(&self) -> &RawJanssonValue
[src]
impl Drop for JanssonValue
[src]
impl Send for JanssonValue
[src]
Auto Trait Implementations
impl RefUnwindSafe for JanssonValue
[src]
impl !Sync for JanssonValue
[src]
impl Unpin for JanssonValue
[src]
impl UnwindSafe for JanssonValue
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,