pub struct Extension {
pub ext_version: u32,
pub ext_type: [u8; 4],
pub vendor_id: u16,
pub critical: bool,
pub encrypted: bool,
pub data: Vec<u8>,
}Expand description
One EXTD chunk.
Fields§
§ext_version: u32Extension format version.
ext_type: [u8; 4]Four-character ASCII type code.
vendor_id: u16Vendor identifier, 0 for an ORA standard extension.
critical: boolWhether a reader that does not implement this extension must refuse the file.
encrypted: boolWhether the payload is sealed.
data: Vec<u8>The extension’s own payload.
Implementations§
Source§impl Extension
impl Extension
Sourcepub fn parse(payload: &[u8], flags: u32) -> Result<Extension>
pub fn parse(payload: &[u8], flags: u32) -> Result<Extension>
Parse a payload and its descriptor flags.
Sourcepub fn is_implemented(&self) -> bool
pub fn is_implemented(&self) -> bool
Whether this crate implements the extension.
It implements none: an extension’s payload is vendor-defined and is copied through, never interpreted (section 4.12). A downstream reader that does implement one overrides this.
Trait Implementations§
impl Eq for Extension
impl StructuralPartialEq for Extension
Auto Trait Implementations§
impl Freeze for Extension
impl RefUnwindSafe for Extension
impl Send for Extension
impl Sync for Extension
impl Unpin for Extension
impl UnsafeUnpin for Extension
impl UnwindSafe for Extension
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