[−][src]Struct kerbalobjects::Symbol
Represents a single symbol in an object file. This can be a function, an object, program data, or anything else.
Implementations
impl Symbol
[src]
pub fn new(
name: &str,
value: KOSValue,
size: u16,
info: SymbolInfo,
symbol_type: SymbolType,
section_index: usize
) -> Symbol
[src]
name: &str,
value: KOSValue,
size: u16,
info: SymbolInfo,
symbol_type: SymbolType,
section_index: usize
) -> Symbol
Creates a new symbol from parts
pub fn read(
symstrtab: &StringTable,
symdata: &SymbolDataSection,
reader: &mut KOFileReader
) -> Result<Symbol, Box<dyn Error>>
[src]
symstrtab: &StringTable,
symdata: &SymbolDataSection,
reader: &mut KOFileReader
) -> Result<Symbol, Box<dyn Error>>
Reads a symbol from the symbol table of a KO file
pub fn write(&self, writer: &mut KOFileWriter) -> Result<(), Box<dyn Error>>
[src]
Write this symbol to a KOFileWriter
pub fn size(&self) -> u16
[src]
Returns the size of the data this symbol represents as stored in the KO file
pub fn width(&self) -> u32
[src]
Returns the width of one symbol in a symbol table
pub fn name(&self) -> &String
[src]
Returns the stored name of this symbol
pub fn value(&self) -> &KOSValue
[src]
Returns the kOS value that this symbol is associated with
pub fn get_type(&self) -> SymbolType
[src]
Returns this symbol's type
pub fn get_info(&self) -> SymbolInfo
[src]
Returns the visibility info of this symbol
pub fn set_name_index(&mut self, index: usize)
[src]
Sets the symbol's name's index into the Symbol String Table
pub fn set_value_index(&mut self, index: usize)
[src]
Sets the symbol's value's index into the Symbol Data Table
pub fn get_value_index(&self) -> usize
[src]
Returns the symbol's value index
pub fn get_section_index(&self) -> usize
[src]
Returns the index of the section that this symbol refers to
pub fn to_string(&self) -> String
[src]
Returns a string representation of this symbol that is mostly only useful for hashing
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Symbol
[src]
impl Send for Symbol
[src]
impl Sync for Symbol
[src]
impl Unpin for Symbol
[src]
impl UnwindSafe for Symbol
[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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,