Struct json_encoder

Source
#[repr(C)]
pub struct json_encoder {
Show 16 fields pub writeStringFunc: json_writeFunc, pub userdata: *mut c_void, pub _bitfield_align_1: [u32; 0], pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4]>, pub startArray: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub addArrayMember: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub endArray: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub startTable: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub addTableMember: Option<unsafe extern "C" fn(encoder: *mut json_encoder, name: *const c_char, len: c_int)>, pub endTable: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub writeNull: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub writeFalse: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub writeTrue: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>, pub writeInt: Option<unsafe extern "C" fn(encoder: *mut json_encoder, num: c_int)>, pub writeDouble: Option<unsafe extern "C" fn(encoder: *mut json_encoder, num: c_double)>, pub writeString: Option<unsafe extern "C" fn(encoder: *mut json_encoder, str_: *const c_char, len: c_int)>,
}

Fields§

§writeStringFunc: json_writeFunc§userdata: *mut c_void§_bitfield_align_1: [u32; 0]§_bitfield_1: __BindgenBitfieldUnit<[u8; 4]>§startArray: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§addArrayMember: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§endArray: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§startTable: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§addTableMember: Option<unsafe extern "C" fn(encoder: *mut json_encoder, name: *const c_char, len: c_int)>§endTable: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§writeNull: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§writeFalse: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§writeTrue: Option<unsafe extern "C" fn(encoder: *mut json_encoder)>§writeInt: Option<unsafe extern "C" fn(encoder: *mut json_encoder, num: c_int)>§writeDouble: Option<unsafe extern "C" fn(encoder: *mut json_encoder, num: c_double)>§writeString: Option<unsafe extern "C" fn(encoder: *mut json_encoder, str_: *const c_char, len: c_int)>

Implementations§

Source§

impl json_encoder

Source

pub fn pretty(&self) -> c_int

Source

pub fn set_pretty(&mut self, val: c_int)

Source

pub unsafe fn pretty_raw(this: *const Self) -> c_int

Source

pub unsafe fn set_pretty_raw(this: *mut Self, val: c_int)

Source

pub fn startedTable(&self) -> c_int

Source

pub fn set_startedTable(&mut self, val: c_int)

Source

pub unsafe fn startedTable_raw(this: *const Self) -> c_int

Source

pub unsafe fn set_startedTable_raw(this: *mut Self, val: c_int)

Source

pub fn startedArray(&self) -> c_int

Source

pub fn set_startedArray(&mut self, val: c_int)

Source

pub unsafe fn startedArray_raw(this: *const Self) -> c_int

Source

pub unsafe fn set_startedArray_raw(this: *mut Self, val: c_int)

Source

pub fn depth(&self) -> c_int

Source

pub fn set_depth(&mut self, val: c_int)

Source

pub unsafe fn depth_raw(this: *const Self) -> c_int

Source

pub unsafe fn set_depth_raw(this: *mut Self, val: c_int)

Source

pub fn new_bitfield_1( pretty: c_int, startedTable: c_int, startedArray: c_int, depth: c_int, ) -> __BindgenBitfieldUnit<[u8; 4]>

Trait Implementations§

Source§

impl Clone for json_encoder

Source§

fn clone(&self) -> json_encoder

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for json_encoder

Source§

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

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

impl Default for json_encoder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Hash for json_encoder

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given [Hasher]. Read more
1.3.0§

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 Ord for json_encoder

Source§

fn cmp(&self, other: &json_encoder) -> Ordering

This method returns an [Ordering] between self and other. Read more
1.21.0§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for json_encoder

Source§

fn eq(&self, other: &json_encoder) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for json_encoder

Source§

fn partial_cmp(&self, other: &json_encoder) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for json_encoder

Source§

impl Eq for json_encoder

Source§

impl StructuralPartialEq for json_encoder

Auto Trait Implementations§

§

impl Freeze for json_encoder

§

impl RefUnwindSafe for json_encoder

§

impl !Send for json_encoder

§

impl !Sync for json_encoder

§

impl Unpin for json_encoder

§

impl UnwindSafe for json_encoder

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

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.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 60 bytes