pub struct TypeMetaHeader { /* private fields */ }Expand description
TypeMeta section header (8 bytes).
Contains counts for the three sub-sections. Located at type_meta_offset.
Implementations§
Source§impl TypeMetaHeader
impl TypeMetaHeader
Sourcepub fn new(
type_defs_count: u16,
type_members_count: u16,
type_names_count: u16,
) -> Self
pub fn new( type_defs_count: u16, type_members_count: u16, type_names_count: u16, ) -> Self
Create a new header.
Sourcepub fn from_bytes(bytes: &[u8]) -> Self
pub fn from_bytes(bytes: &[u8]) -> Self
Decode from 8 bytes.
pub fn type_defs_count(&self) -> u16
pub fn type_members_count(&self) -> u16
pub fn type_names_count(&self) -> u16
Trait Implementations§
Source§impl Clone for TypeMetaHeader
impl Clone for TypeMetaHeader
Source§fn clone(&self) -> TypeMetaHeader
fn clone(&self) -> TypeMetaHeader
Returns a duplicate of the value. Read more
1.0.0 · 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 TypeMetaHeader
impl Debug for TypeMetaHeader
Source§impl Default for TypeMetaHeader
impl Default for TypeMetaHeader
Source§fn default() -> TypeMetaHeader
fn default() -> TypeMetaHeader
Returns the “default value” for a type. Read more
Source§impl PartialEq for TypeMetaHeader
impl PartialEq for TypeMetaHeader
impl Copy for TypeMetaHeader
impl Eq for TypeMetaHeader
impl StructuralPartialEq for TypeMetaHeader
Auto Trait Implementations§
impl Freeze for TypeMetaHeader
impl RefUnwindSafe for TypeMetaHeader
impl Send for TypeMetaHeader
impl Sync for TypeMetaHeader
impl Unpin for TypeMetaHeader
impl UnwindSafe for TypeMetaHeader
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
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
Compare self to
key and return true if they are equal.