[][src]Struct pmd_flow::FlowData

pub struct FlowData {
    pub unknown1: u32,
    pub unknown2: u16,
    // some fields omitted
}

Contain the data obtained from a binary flow file. It is hightly recommended to process it with [FlowDataOutput] if you plan to do high level modification on it.

The file contain a list of dictionaries, and a list of vectors, orderer.

Each entry of the dictionary/vector can be a string or a reference to another dic/vec

Dictionary are indixed by String, Vec by position.

Fields

unknown1: u32unknown2: u16

Implementations

impl FlowData[src]

pub fn push_dictionary(
    &mut self,
    values: HashMap<String, FlowDataValue>
) -> Result<u16, FlowDataError>
[src]

A new dictionary to the FlowData

pub fn push_vector(
    &mut self,
    values: Vec<FlowDataValue>
) -> Result<u16, FlowDataError>
[src]

Add a new vector in the FlowData

pub fn dictionary_len(&self) -> usize[src]

return the number of dictionary

pub fn vector_len(&self) -> usize[src]

return the number of vector

pub fn get_dictionary(
    &self,
    dicid: usize
) -> Option<&HashMap<String, FlowDataValue>>
[src]

return a reference to a dictionary if it exist, None otherwise

pub fn get_dictionary_mut(
    &mut self,
    dicid: usize
) -> Option<&mut HashMap<String, FlowDataValue>>
[src]

return a mutable reference to a dictionary if it exist, None otherwise

pub fn get_vector(&self, vecid: usize) -> Option<&Vec<FlowDataValue>>[src]

return a reference to a vector if it exist, None otherwise.

pub fn get_vector_mut(
    &mut self,
    vecid: usize
) -> Option<&mut Vec<FlowDataValue>>
[src]

return a mutable reference to a vector if it exist, None otherwise.

impl FlowData[src]

pub fn new<T: Read + Seek>(file: &mut T) -> Result<FlowData, FlowDataError>[src]

decode a binary flow file

pub fn write<T: Write + Seek>(&self, file: &mut T) -> Result<(), FlowDataError>[src]

encode a binary flow file

note that entry are automatically deduplicated.

Trait Implementations

impl Debug for FlowData[src]

impl Default for FlowData[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.