Enum yrs::types::Value [−][src]
pub enum Value {
Any(Any),
YText(Text),
YArray(Array),
YMap(Map),
YXmlElement(XmlElement),
YXmlText(XmlText),
}
Expand description
Value that can be returned by Yrs data types. This includes Any which is an extension representation of JSON, but also nested complex collaborative structures specific to Yrs.
Variants
Any(Any)
Primitive value.
Tuple Fields of Any
0: Any
YText(Text)
Tuple Fields of YText
0: Text
YArray(Array)
Tuple Fields of YArray
0: Array
YMap(Map)
Tuple Fields of YMap
0: Map
YXmlElement(XmlElement)
Tuple Fields of YXmlElement
0: XmlElement
YXmlText(XmlText)
Tuple Fields of YXmlText
0: XmlText
Implementations
Converts current value into Any object equivalent that resembles enhanced JSON payload. Rules are:
- Primitive types (Value::Any) are passed right away, as no transformation is needed.
- Value::YArray is converted into JSON-like array.
- Value::YMap is converted into JSON-like object map.
- Value::YText, Value::YXmlText and Value::YXmlElement are converted into strings (XML types are stringified XML representation).
Converts current value into stringified representation.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Value
impl !UnwindSafe for Value
Blanket Implementations
Mutably borrows from an owned value. Read more