[−][src]Struct kerbalobjects::KOFile
A structure that represents an entire KO file
Implementations
impl KOFile
[src]
pub fn new() -> KOFile
[src]
Creates a new KO file from nothing
pub fn read(reader: &mut KOFileReader) -> Result<KOFile, Box<dyn Error>>
[src]
Reads a KO file from the provided reader and returns it if it was successful
pub fn write(&mut self, writer: &mut KOFileWriter) -> Result<(), Box<dyn Error>>
[src]
Writes a KO file to the provided writer
pub fn is_entry_point(&self) -> bool
[src]
This function returns true if the KO file contains the main .text section
pub fn get_mut_header_table(&mut self) -> &mut HeaderTable
[src]
Returns a mutable reference to the KO file's current header table
pub fn get_mut_symstrtab(&mut self) -> &mut StringTable
[src]
Returns a mutable reference to the KO file's symbol string table
pub fn get_mut_symdata(&mut self) -> &mut SymbolDataSection
[src]
Returns a mutable reference to the KO file's symbol data section
pub fn get_mut_symtab(&mut self) -> &mut SymbolTable
[src]
Returns a mutable reference to the KO file's symbol table
pub fn get_header_table(&mut self) -> &HeaderTable
[src]
Returns a reference to the KO file's current header table
pub fn get_symstrtab(&self) -> &StringTable
[src]
Returns a reference to the KO file's symbol string table
pub fn get_symdata(&self) -> &SymbolDataSection
[src]
Returns a reference to the KO file's symbol data section
pub fn get_symtab(&self) -> &SymbolTable
[src]
Returns a reference to the KO file's symbol table
pub fn get_debug(&mut self) -> Option<&mut DebugSection>
[src]
Returns an option that either contains this KO file's debug section if it has one, or None
pub fn get_code_sections(&self) -> &Vec<RelSection>
[src]
Returns a reference to the internal vector of code sections
pub fn get_string_tables(&self) -> &Vec<StringTable>
[src]
Returns a reference to the internal vector of string tables
pub fn add_symbol(&mut self, symbol: Symbol) -> usize
[src]
Adds a symbol to the symbol table and symbol string tables in the proper way
pub fn add_code_section(&mut self, code_section: RelSection)
[src]
This function adds a code section to the internal vector of code sections
pub fn add_string_table(&mut self, string_table: StringTable)
[src]
This function adds a string table to the internal vector of string tables
pub fn set_debug(&mut self, debug: DebugSection)
[src]
This function sets this KO file's debug section
pub fn length(&self) -> u32
[src]
Returns the length of the entire file in bytes
pub fn version(&self) -> u8
[src]
Returns the current KO file version number of this file
pub fn num_sections(&self) -> u16
[src]
Returns the number of sections that this KO file contains
pub fn regenerate_headers(&mut self)
[src]
Regenerates all section headers and their associated data like sizes and offsets
Auto Trait Implementations
impl RefUnwindSafe for KOFile
[src]
impl Send for KOFile
[src]
impl Sync for KOFile
[src]
impl Unpin for KOFile
[src]
impl UnwindSafe for KOFile
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,