#[repr(C)]pub struct mpv_node {
pub u: mpv_node__bindgen_ty_1,
pub format: mpv_format,
}
Expand description
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_1
§format: 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§
Auto Trait Implementations§
impl Freeze for mpv_node
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§
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