#[repr(C)]pub struct YOutput {
pub tag: i8,
pub len: u32,
/* 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:
- 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
YText
data types. - Y_ARRAY for pointers to
YArray
data types. - Y_MAP for pointers to
YMap
data types. - Y_XML_ELEM for pointers to
YXmlElement
data types. - Y_XML_TEXT for pointers to
YXmlText
data types. - Y_DOC for pointers to nested
YDocRef
data types.
len: u32
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§
source§impl From<XmlElementRef> for YOutput
impl From<XmlElementRef> for YOutput
source§fn from(v: XmlElementRef) -> Self
fn from(v: XmlElementRef) -> Self
Converts to this type from the input type.
source§impl From<XmlFragmentRef> for YOutput
impl From<XmlFragmentRef> for YOutput
source§fn from(v: XmlFragmentRef) -> Self
fn from(v: XmlFragmentRef) -> Self
Converts to this type from the input type.
source§impl From<XmlTextRef> for YOutput
impl From<XmlTextRef> for YOutput
source§fn from(v: XmlTextRef) -> Self
fn from(v: XmlTextRef) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for YOutput
impl !RefUnwindSafe for YOutput
impl !Send for YOutput
impl !Sync for YOutput
impl Unpin for YOutput
impl !UnwindSafe for YOutput
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more