pub struct Note<'data, Elf>where
Elf: FileHeader,{ /* private fields */ }
Expand description
A parsed NoteHeader
.
Implementations§
source§impl<'data, Elf: FileHeader> Note<'data, Elf>
impl<'data, Elf: FileHeader> Note<'data, Elf>
sourcepub fn n_type(&self, endian: Elf::Endian) -> u32
pub fn n_type(&self, endian: Elf::Endian) -> u32
Return the n_type
field of the NoteHeader
.
The meaning of this field is determined by name
.
sourcepub fn n_namesz(&self, endian: Elf::Endian) -> u32
pub fn n_namesz(&self, endian: Elf::Endian) -> u32
Return the n_namesz
field of the NoteHeader
.
sourcepub fn n_descsz(&self, endian: Elf::Endian) -> u32
pub fn n_descsz(&self, endian: Elf::Endian) -> u32
Return the n_descsz
field of the NoteHeader
.
sourcepub fn name_bytes(&self) -> &'data [u8] ⓘ
pub fn name_bytes(&self) -> &'data [u8] ⓘ
Return the bytes for the name field following the NoteHeader
.
This field is usually a string including one or more trailing null bytes (but it is not required to be).
The length of this field is given by n_namesz
.
sourcepub fn name(&self) -> &'data [u8] ⓘ
pub fn name(&self) -> &'data [u8] ⓘ
Return the bytes for the name field following the NoteHeader
,
excluding all trailing null bytes.
sourcepub fn desc(&self) -> &'data [u8] ⓘ
pub fn desc(&self) -> &'data [u8] ⓘ
Return the bytes for the desc field following the NoteHeader
.
The length of this field is given by n_descsz
. The meaning
of this field is determined by name
and n_type
.
sourcepub fn gnu_properties(
&self,
endian: Elf::Endian,
) -> Option<GnuPropertyIterator<'data, Elf::Endian>>
pub fn gnu_properties( &self, endian: Elf::Endian, ) -> Option<GnuPropertyIterator<'data, Elf::Endian>>
Return an iterator for properties if this note’s type is elf::NT_GNU_PROPERTY_TYPE_0
.