BackendData

Struct BackendData 

Source
pub struct BackendData<K: Eq + Hash> {
    pub symbol_table: BiHashMap<String, SymbolId>,
    pub root_elem_table: HashMap<SymbolId, ElemId>,
    pub type_table: HashMap<ElemId, SymbolId>,
    pub bool_table: HashMap<ElemId, bool>,
    pub number_table: HashMap<ElemId, i64>,
    pub string_table: HashMap<ElemId, SymbolId>,
    pub map_table: HashMap<(ElemId, K), ElemId>,
    pub struct_type_table: HashMap<ElemId, SymbolId>,
    pub struct_table: HashMap<(ElemId, SymbolId), ElemId>,
    pub seq_table: HashMap<(ElemId, usize), ElemId>,
    pub variant_type_table: HashMap<ElemId, (SymbolId, SymbolId)>,
    pub tuple_table: HashMap<(ElemId, usize), ElemId>,
}
Expand description

Table data generated by vector backends.

Fields§

§symbol_table: BiHashMap<String, SymbolId>§root_elem_table: HashMap<SymbolId, ElemId>

Stores root elemets of files.

§type_table: HashMap<ElemId, SymbolId>

Stores types of elements. Columns: (elem, elem type)

§bool_table: HashMap<ElemId, bool>

Stores values of boolean elements. Columns: (elem, value)

§number_table: HashMap<ElemId, i64>

Stores values of number elements. Columns: (elem, value)

§string_table: HashMap<ElemId, SymbolId>

Stores values of string elements. Columns: (elem, symbol)

§map_table: HashMap<(ElemId, K), ElemId>

Stores map entry facts. Columns: (elem, key, value)

§struct_type_table: HashMap<ElemId, SymbolId>

Stores type names of structs. Columns: (elem, struct name)

§struct_table: HashMap<(ElemId, SymbolId), ElemId>

Stores struct field facts. Columns: (elem, field name, value elem)

§seq_table: HashMap<(ElemId, usize), ElemId>

Stores sequence entry facts. Columns: (elem, index, value)

§variant_type_table: HashMap<ElemId, (SymbolId, SymbolId)>

Stores type and variant names of variant elements. (elem, enum name, variant name)

§tuple_table: HashMap<(ElemId, usize), ElemId>

Stores tuple entry facts. Columns: (elem, index, value)

Implementations§

Source§

impl<K: Eq + Hash> BackendData<K>

Source

pub fn dump_with_fn<'a, S>(&'a self, map_key_fn: impl Fn(&'a Self, &'a K) -> S)
where K: 'a, S: 'a + Display,

Print generated fact tables to standard output.

Source

pub fn dump(&self)
where K: Display,

dump function that does not require a printing function for map keys; this can only be called when map key type K implements Display.

Trait Implementations§

Source§

impl<K: Display + Eq + Hash> Default for BackendData<K>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<K> Freeze for BackendData<K>

§

impl<K> RefUnwindSafe for BackendData<K>
where K: RefUnwindSafe,

§

impl<K> Send for BackendData<K>
where K: Send,

§

impl<K> Sync for BackendData<K>
where K: Sync,

§

impl<K> Unpin for BackendData<K>
where K: Unpin,

§

impl<K> UnwindSafe for BackendData<K>
where K: UnwindSafe,

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

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>,

Source§

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.