[−][src]Struct pmd_flow::FlowData
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: u32
unknown2: u16
Implementations
impl FlowData
[src]
pub fn push_dictionary(
&mut self,
values: HashMap<String, FlowDataValue>
) -> Result<u16, FlowDataError>
[src]
&mut self,
values: HashMap<String, FlowDataValue>
) -> Result<u16, FlowDataError>
A new dictionary to the FlowData
pub fn push_vector(
&mut self,
values: Vec<FlowDataValue>
) -> Result<u16, FlowDataError>
[src]
&mut self,
values: Vec<FlowDataValue>
) -> Result<u16, FlowDataError>
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]
&self,
dicid: usize
) -> Option<&HashMap<String, FlowDataValue>>
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]
&mut self,
dicid: usize
) -> Option<&mut HashMap<String, FlowDataValue>>
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]
&mut self,
vecid: usize
) -> Option<&mut Vec<FlowDataValue>>
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
Auto Trait Implementations
impl RefUnwindSafe for FlowData
impl Send for FlowData
impl Sync for FlowData
impl Unpin for FlowData
impl UnwindSafe for FlowData
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,
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, 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.
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>,