1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
use crate::{header, section, segment};
pub trait ELF {
    type Header: header::ELFHeader;
    type Section: section::Section;
    type Segment: segment::Segment;

    fn new(header: Self::Header) -> Self;
    fn header(&self) -> Self::Header;

    fn sections_as_mut(&mut self) -> &mut Vec<Self::Section>;
    fn update_sections(&mut self, sections: Vec<Self::Section>);
    fn update_segments(&mut self, segments: Vec<Self::Segment>);
}