pub struct Meta {
pub title: String,
pub author: String,
pub group: String,
pub date: String,
pub size: u32,
pub type: (u8, u8),
pub width: u16,
pub height: u16,
pub flags: u8,
pub font: String,
pub notes: Vec<String>,
}
Expand description
A structure representing a file’s metadata
Fields§
§title: String
The image’s title
The image’s author
group: String
The image author’s team or group
date: String
The image creation date, in the YYYYMMDD format
size: u32
The size of the file, sans this metadata
type: (u8, u8)
The type of this file
Only supported values are
(0, 0)
→None
(effectively,Character/ANSI
)(1, 0)
→Character/ASCII
(1, 1)
→Character/ANSI
width: u16
Width of the image
height: u16
Height of the image
flags: u8
A bitfield of flags that define how to process an image
font: String
The name of the font this image uses
Only IBM VGA is supported.
notes: Vec<String>
A list of comments on this image
Implementations§
Source§impl Meta
impl Meta
Wrap the author in an Option
.
See author
field
Sourcepub fn size(&self) -> u32
pub fn size(&self) -> u32
Fetch the size.
See size
field
Sourcepub fn dimensions(&self) -> (u16, u16)
pub fn dimensions(&self) -> (u16, u16)
Sourcepub fn font(&self) -> Option<&String>
pub fn font(&self) -> Option<&String>
Fetch the font if font != ""
, otherwise the default.
See font
field
Sourcepub fn font_face_otb(&self) -> &Face<'_>
pub fn font_face_otb(&self) -> &Face<'_>
Font face, in OTB format.
See font
field
Sourcepub fn font_face_woff(&self) -> &[u8] ⓘ
pub fn font_face_woff(&self) -> &[u8] ⓘ
Font face, in WOFF format.
See font
field
Sourcepub fn notes(&self) -> &Vec<String>
pub fn notes(&self) -> &Vec<String>
Fetch the notes.
See notes
field
Sourcepub fn aspect_ratio(&self) -> (u8, u8)
pub fn aspect_ratio(&self) -> (u8, u8)
Compute the aspect ratio.
See flags
field
Sourcepub fn font_width(&self) -> u8
pub fn font_width(&self) -> u8
Font width.
See flags
field
Sourcepub fn font_height(&self) -> u8
pub fn font_height(&self) -> u8
Font height.
Trait Implementations§
impl Eq for Meta
impl StructuralPartialEq for Meta
Auto Trait Implementations§
impl Freeze for Meta
impl RefUnwindSafe for Meta
impl Send for Meta
impl Sync for Meta
impl Unpin for Meta
impl UnwindSafe for Meta
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.