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: i8Tag describing, which value type is being stored by this input cell. Can be one of:
- Y_JSON_BOOL for boolean flags.
- Y_JSON_NUM for 64-bit floating point numbers.
- Y_JSON_INT for 64-bit signed integers.
- Y_JSON_STR for null-terminated UTF-8 encoded strings.
- Y_JSON_BUF for embedded binary data.
- Y_JSON_ARR for arrays of JSON-like values.
- Y_JSON_MAP for JSON-like objects build from key-value pairs.
- Y_JSON_NULL for JSON-like null values.
- Y_JSON_UNDEF for JSON-like undefined values.
- Y_TEXT for pointers to
YTextdata types. - Y_ARRAY for pointers to
YArraydata types. - Y_MAP for pointers to
YMapdata types. - Y_XML_ELEM for pointers to
YXmlElementdata types. - Y_XML_TEXT for pointers to
YXmlTextdata types.
len: c_intLength 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
sourceimpl From<XmlElement> for YOutput
impl From<XmlElement> for YOutput
sourcefn from(v: XmlElement) -> Self
fn from(v: XmlElement) -> Self
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for YOutput
impl !Send for YOutput
impl !Sync for YOutput
impl Unpin for YOutput
impl !UnwindSafe for YOutput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more