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

Fields

§incfile: Option<String>
§line: u32

Implementations§

source§

impl GenericIfData

source

pub fn get_block_items( &self ) -> Result<(Option<String>, u32, &Vec<GenericIfData>), &'static str>

source

pub fn get_struct_items( &self ) -> Result<(Option<String>, u32, &Vec<GenericIfData>), &'static str>

source

pub fn get_int_is_hex(&self) -> Result<bool, &'static str>

source

pub fn get_integer_u8(&self) -> Result<u8, &'static str>

source

pub fn get_integer_u16(&self) -> Result<u16, &'static str>

source

pub fn get_integer_u32(&self) -> Result<u32, &'static str>

source

pub fn get_integer_u64(&self) -> Result<u64, &'static str>

source

pub fn get_integer_i8(&self) -> Result<i8, &'static str>

source

pub fn get_integer_i16(&self) -> Result<i16, &'static str>

source

pub fn get_integer_i32(&self) -> Result<i32, &'static str>

source

pub fn get_integer_i64(&self) -> Result<i64, &'static str>

source

pub fn get_float(&self) -> Result<f32, &'static str>

source

pub fn get_double(&self) -> Result<f64, &'static str>

source

pub fn get_stringval(&self) -> Result<String, &'static str>

source

pub fn get_array(&self) -> Result<&Vec<GenericIfData>, &'static str>

source

pub fn get_sequence(&self) -> Result<&Vec<GenericIfData>, &'static str>

source

pub fn get_line(&self) -> Result<u32, &'static str>

source

pub fn get_single_optitem<T>( &self, tag: &str, func: fn(_: &GenericIfData, _: u32, _: u32, _: u32) -> Result<T, &'static str> ) -> Result<Option<T>, &'static str>

source

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

source§

fn clone(&self) -> GenericIfData

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GenericIfData

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for GenericIfData

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.