pub struct Format(/* private fields */);
Expand description
A type representing the possible data types used in communication with mpv.
Implementations§
Source§impl Format
impl Format
Sourcepub const NONE: Format
pub const NONE: Format
A Format
representing MPV_FORMAT_NONE
,
sometimes returned from mpv to denote an error or other special circumstance.
Sourcepub const STRING: Format
pub const STRING: Format
A Format
representing Rust’s String
and mpv’s MPV_FORMAT_STRING
.
It represents a raw property string, like using ${=property}
in input.conf
.
See the mpv docs on raw and formatted properties.
§Warning
Although the encoding is usually UTF-8, this is not always the case. File tags often store strings in some legacy codepage, and even filenames don’t necessarily have to be in UTF-8 (at least on Linux).
If this crate receives invalid UTF-8, a RustError::InvalidUtf8
may be returned.
On Windows, filenames are always UTF-8, and libmpv converts between UTF-8 and UTF-16 when using Win32 API functions.
Sourcepub const OSD_STRING: Format
pub const OSD_STRING: Format
A Format
representing OsdString
(a New Type around String
)
and mpv’s MPV_FORMAT_OSD_STRING
.
It represents an OSD property string, like using ${property}
in input.conf
.
See the mpv docs on raw and formatted properties.
In many cases, this is the same as the raw string, but in other cases it’s formatted for display on OSD.
It’s intended to be human-readable. Do not attempt to parse these strings.
Sourcepub const NODE_ARRAY: Format
pub const NODE_ARRAY: Format
A Format
representing the crate’s NodeArray
(a type alias for Vec<Node>
)
and mpv’s MPV_FORMAT_NODE_ARRAY
.
Sourcepub const NODE_MAP: Format
pub const NODE_MAP: Format
A Format
representing the crate’s NodeMap
(a type alias for HashMap<String, Node>
)
and mpv’s MPV_FORMAT_NODE_MAP
.
Sourcepub const BYTE_ARRAY: Format
pub const BYTE_ARRAY: Format
A Format
representing the crate’s ByteArray
(a type alias for Vec<u8>
)
and mpv’s MPV_FORMAT_BYTE_ARRAY
.