Enum a2lfile::GenericIfData
source · pub enum GenericIfData {
Show 19 variants
None,
Char(u32, (i8, bool)),
Int(u32, (i16, bool)),
Long(u32, (i32, bool)),
Int64(u32, (i64, bool)),
UChar(u32, (u8, bool)),
UInt(u32, (u16, bool)),
ULong(u32, (u32, bool)),
UInt64(u32, (u64, bool)),
Float(u32, f32),
Double(u32, f64),
String(u32, String),
Array(Vec<GenericIfData>),
EnumItem(u32, String),
Sequence(Vec<GenericIfData>),
TaggedStruct(HashMap<String, Vec<GenericIfDataTaggedItem>>),
TaggedUnion(HashMap<String, Vec<GenericIfDataTaggedItem>>),
Struct(Option<String>, u32, Vec<GenericIfData>),
Block {
incfile: Option<String>,
line: u32,
items: Vec<GenericIfData>,
},
}
Expand description
generic representation of data inside an IF_DATA
block that can be loaded into application-specific data structures
Variants§
None
Char(u32, (i8, bool))
Int(u32, (i16, bool))
Long(u32, (i32, bool))
Int64(u32, (i64, bool))
UChar(u32, (u8, bool))
UInt(u32, (u16, bool))
ULong(u32, (u32, bool))
UInt64(u32, (u64, bool))
Float(u32, f32)
Double(u32, f64)
String(u32, String)
Array(Vec<GenericIfData>)
EnumItem(u32, String)
Sequence(Vec<GenericIfData>)
TaggedStruct(HashMap<String, Vec<GenericIfDataTaggedItem>>)
TaggedUnion(HashMap<String, Vec<GenericIfDataTaggedItem>>)
Struct(Option<String>, u32, Vec<GenericIfData>)
Block
Implementations§
source§impl GenericIfData
impl GenericIfData
pub fn get_block_items( &self ) -> Result<(Option<String>, u32, &Vec<GenericIfData>), &'static str>
pub fn get_struct_items( &self ) -> Result<(Option<String>, u32, &Vec<GenericIfData>), &'static str>
pub fn get_int_is_hex(&self) -> Result<bool, &'static str>
pub fn get_integer_u8(&self) -> Result<u8, &'static str>
pub fn get_integer_u16(&self) -> Result<u16, &'static str>
pub fn get_integer_u32(&self) -> Result<u32, &'static str>
pub fn get_integer_u64(&self) -> Result<u64, &'static str>
pub fn get_integer_i8(&self) -> Result<i8, &'static str>
pub fn get_integer_i16(&self) -> Result<i16, &'static str>
pub fn get_integer_i32(&self) -> Result<i32, &'static str>
pub fn get_integer_i64(&self) -> Result<i64, &'static str>
pub fn get_float(&self) -> Result<f32, &'static str>
pub fn get_double(&self) -> Result<f64, &'static str>
pub fn get_stringval(&self) -> Result<String, &'static str>
pub fn get_array(&self) -> Result<&Vec<GenericIfData>, &'static str>
pub fn get_sequence(&self) -> Result<&Vec<GenericIfData>, &'static str>
pub fn get_line(&self) -> Result<u32, &'static str>
pub fn get_single_optitem<T>( &self, tag: &str, func: fn(_: &GenericIfData, _: u32, _: u32, _: u32) -> Result<T, &'static str> ) -> Result<Option<T>, &'static str>
pub fn get_multiple_optitems<T>( &self, tag: &str, func: fn(_: &GenericIfData, _: u32, _: u32, _: u32) -> Result<T, &'static str> ) -> Result<Vec<T>, &'static str>
Trait Implementations§
source§impl Clone for GenericIfData
impl Clone for GenericIfData
source§fn clone(&self) -> GenericIfData
fn clone(&self) -> GenericIfData
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for GenericIfData
impl Debug for GenericIfData
Auto Trait Implementations§
impl Freeze for GenericIfData
impl RefUnwindSafe for GenericIfData
impl Send for GenericIfData
impl Sync for GenericIfData
impl Unpin for GenericIfData
impl UnwindSafe for GenericIfData
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more