}
}
+pub struct Encoding(pub String);
+
+impl ExtensionRecord for Encoding {
+ const SIZE: Option<u32> = Some(1);
+ const COUNT: Option<u32> = None;
+ const NAME: &'static str = "encoding record";
+
+ fn parse(ext: &Extension, endian: Endian) -> Result<Self, Error>{
+ ext.check_size::<Self>()?;
+
+ Ok(Encoding(String::from_utf8(ext.data)?))
+ }
+}
+
pub struct Extension {
/// Offset from the start of the file to the start of the record.
pub offset: u64,