Struct yrs::YOutput

source ·
#[repr(C)]
pub struct YOutput { pub tag: i8, pub len: c_int, /* private fields */ }
Expand description

An output value cell returned from yrs API methods. It describes a various types of data supported by yrs shared data types.

Since YOutput instances are always created by calling the corresponding yrs API functions, they eventually should be deallocated using youtput_destroy function.

Fields

tag: i8

Tag describing, which value type is being stored by this input cell. Can be one of:

len: c_int

Length of the contents stored by a current YOutput cell.

For Y_JSON_NULL and Y_JSON_UNDEF its equal to 0.

For Y_JSON_ARR, Y_JSON_MAP it describes a number of passed elements.

For other types it’s always equal to 1.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.