Struct yrs::YOutput

source ·
#[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:

§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 Display for YOutput

source§

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

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

impl Drop for YOutput

source§

fn drop(&mut self)

Executes the destructor for this type. Read more
source§

impl From<Any> for YOutput

source§

fn from(v: Any) -> Self

Converts to this type from the input type.
source§

impl From<ArrayRef> for YOutput

source§

fn from(v: ArrayRef) -> Self

Converts to this type from the input type.
source§

impl From<BranchPtr> for YOutput

source§

fn from(v: BranchPtr) -> Self

Converts to this type from the input type.
source§

impl From<Doc> for YOutput

source§

fn from(v: Doc) -> Self

Converts to this type from the input type.
source§

impl From<MapRef> for YOutput

source§

fn from(v: MapRef) -> Self

Converts to this type from the input type.
source§

impl From<TextRef> for YOutput

source§

fn from(v: TextRef) -> Self

Converts to this type from the input type.
source§

impl From<Value> for YOutput

source§

fn from(v: Value) -> Self

Converts to this type from the input type.
source§

impl From<WeakRef<BranchPtr>> for YOutput

source§

fn from(v: WeakRef<BranchPtr>) -> Self

Converts to this type from the input type.
source§

impl From<XmlElementRef> for YOutput

source§

fn from(v: XmlElementRef) -> Self

Converts to this type from the input type.
source§

impl From<XmlFragmentRef> for YOutput

source§

fn from(v: XmlFragmentRef) -> Self

Converts to this type from the input type.
source§

impl From<XmlTextRef> for YOutput

source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

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

§

type Error = Infallible

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

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

Performs the conversion.
source§

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

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

Performs the conversion.