pub struct Script<'a> { /* private fields */ }Expand description
Parsed Script table (chapter 2 §“Script table”).
Layout:
0 / 2 / defaultLangSysOffset (Offset16, may be NULL)
2 / 2 / langSysCount
4 / 6 / langSysRecords[] (tag[4] + langSysOffset[2])Implementations§
Source§impl<'a> Script<'a>
impl<'a> Script<'a>
pub fn parse(bytes: &'a [u8]) -> Result<Self, Error>
Sourcepub fn has_default_lang_sys(&self) -> bool
pub fn has_default_lang_sys(&self) -> bool
true iff a default LangSys is present (defaultLangSysOffset != 0).
Sourcepub fn lang_sys_count(&self) -> u16
pub fn lang_sys_count(&self) -> u16
Number of language-system records (excluding the default).
Sourcepub fn default_lang_sys(&self) -> Option<Result<LangSys<'a>, Error>>
pub fn default_lang_sys(&self) -> Option<Result<LangSys<'a>, Error>>
Parse the default LangSys, or None if not present.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Script<'a>
impl<'a> RefUnwindSafe for Script<'a>
impl<'a> Send for Script<'a>
impl<'a> Sync for Script<'a>
impl<'a> Unpin for Script<'a>
impl<'a> UnsafeUnpin for Script<'a>
impl<'a> UnwindSafe for Script<'a>
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