[][src]Struct libmpv_sys::mpv_node

#[repr(C)]pub struct mpv_node {
    pub u: mpv_node__bindgen_ty_1,
    pub format: mpv_format,
}

Generic data storage.

If mpv writes this struct (e.g. via mpv_get_property()), you must not change the data. In some cases (mpv_get_property()), you have to free it with mpv_free_node_contents(). If you fill this struct yourself, you're also responsible for freeing it, and you must not call mpv_free_node_contents().

Fields

u: mpv_node__bindgen_ty_1format: mpv_format

Type of the data stored in this struct. This value rules what members in the given union can be accessed. The following formats are currently defined to be allowed in mpv_node:

MPV_FORMAT_STRING (u.string) MPV_FORMAT_FLAG (u.flag) MPV_FORMAT_INT64 (u.int64) MPV_FORMAT_DOUBLE (u.double_) MPV_FORMAT_NODE_ARRAY (u.list) MPV_FORMAT_NODE_MAP (u.list) MPV_FORMAT_BYTE_ARRAY (u.ba) MPV_FORMAT_NONE (no member)

If you encounter a value you don't know, you must not make any assumptions about the contents of union u.

Trait Implementations

impl Clone for mpv_node[src]

impl Copy for mpv_node[src]

impl Debug for mpv_node[src]

Auto Trait Implementations

impl RefUnwindSafe for mpv_node

impl !Send for mpv_node

impl !Sync for mpv_node

impl Unpin for mpv_node

impl UnwindSafe for mpv_node

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.