Struct elf_utilities::section::Shdr64
source · [−]#[repr(C)]pub struct Shdr64 {
pub sh_name: Elf64Word,
pub sh_type: Elf64Word,
pub sh_flags: Elf64Xword,
pub sh_addr: Elf64Addr,
pub sh_offset: Elf64Off,
pub sh_size: Elf64Xword,
pub sh_link: Elf64Word,
pub sh_info: Elf64Word,
pub sh_addralign: Elf64Xword,
pub sh_entsize: Elf64Xword,
}Fields
sh_name: Elf64Wordsh_type: Elf64Wordsh_flags: Elf64Xwordsh_addr: Elf64Addrsh_offset: Elf64Offsh_size: Elf64Xwordsh_link: Elf64Wordsh_info: Elf64Wordsh_addralign: Elf64Xwordsh_entsize: Elf64XwordImplementations
sourceimpl Shdr64
impl Shdr64
pub fn size() -> Elf64Half
pub fn get_type(&self) -> TYPE
pub fn set_type(&mut self, ty: TYPE)
sourcepub fn to_le_bytes(&self) -> Vec<u8>
pub fn to_le_bytes(&self) -> Vec<u8>
Create Vec
Examples
use elf_utilities::section::Shdr64;
let null_sct : Shdr64 = Default::default();
assert_eq!([0].repeat(Shdr64::size() as usize), null_sct.to_le_bytes());pub fn deserialize(buf: &[u8], start: usize) -> Result<Self, Box<dyn Error>>
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Shdr64
impl<'de> Deserialize<'de> for Shdr64
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for Shdr64
impl Ord for Shdr64
sourceimpl PartialOrd<Shdr64> for Shdr64
impl PartialOrd<Shdr64> for Shdr64
sourcefn partial_cmp(&self, other: &Shdr64) -> Option<Ordering>
fn partial_cmp(&self, other: &Shdr64) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
impl Copy for Shdr64
impl Eq for Shdr64
impl StructuralEq for Shdr64
impl StructuralPartialEq for Shdr64
Auto Trait Implementations
impl RefUnwindSafe for Shdr64
impl Send for Shdr64
impl Sync for Shdr64
impl Unpin for Shdr64
impl UnwindSafe for Shdr64
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more