pub struct SectionIndex {
pub count: u32,
pub entries: Vec<SectionEntry>,
}Expand description
セクションインデックス。
Fields§
§count: u32セクション数。
entries: Vec<SectionEntry>エントリ一覧。
Implementations§
Source§impl SectionIndex
impl SectionIndex
Sourcepub const ENTRY_SIZE: usize = SECTION_ENTRY_SIZE
pub const ENTRY_SIZE: usize = SECTION_ENTRY_SIZE
エントリの固定サイズ。
Sourcepub fn add_entry(&mut self, entry: SectionEntry)
pub fn add_entry(&mut self, entry: SectionEntry)
エントリを追加する。
Sourcepub fn filter_by_type(&self, section_type: SectionType) -> Vec<&SectionEntry>
pub fn filter_by_type(&self, section_type: SectionType) -> Vec<&SectionEntry>
タイプでフィルタする。
Sourcepub fn find_by_id(&self, section_id: u32) -> Option<&SectionEntry>
pub fn find_by_id(&self, section_id: u32) -> Option<&SectionEntry>
IDで検索する。
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, FormatError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, FormatError>
バイト列からデシリアライズする。
Sourcepub fn serialized_size(&self) -> usize
pub fn serialized_size(&self) -> usize
シリアライズ後のサイズ(バイト)を返す。
Trait Implementations§
Source§impl Clone for SectionIndex
impl Clone for SectionIndex
Source§fn clone(&self) -> SectionIndex
fn clone(&self) -> SectionIndex
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SectionIndex
impl Debug for SectionIndex
Source§impl Default for SectionIndex
impl Default for SectionIndex
impl Eq for SectionIndex
Source§impl PartialEq for SectionIndex
impl PartialEq for SectionIndex
impl StructuralPartialEq for SectionIndex
Auto Trait Implementations§
impl Freeze for SectionIndex
impl RefUnwindSafe for SectionIndex
impl Send for SectionIndex
impl Sync for SectionIndex
impl Unpin for SectionIndex
impl UnsafeUnpin for SectionIndex
impl UnwindSafe for SectionIndex
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