Module serialization

Source
Expand description

Serialization/Deserialization helpers

Re-exports§

pub use crate::errors::SerializationError;

Traits§

Packable
Can be wrapped within a TofPacket. To do, we just have to define a packet type
Serialization
Encode/decode structs to Vec::<u8> to write to a file or send over the network

Functions§

get_json_from_file
parse_bool
parse_f16
parse_f32
parse_f64
parse_u8
parse_u8_deque
parse_u16
Get u32 from a bytestream and move on the position marker
parse_u32
parse_u64
parse_u16_be
parse_u16_deque
parse_u32_be
BIG Endian version of parse_u32. NOT for botched event id decoding! Used for network communications
parse_u32_for_16bit_words
Get an u32 from a bytestream
parse_u48_for_16bit_words
Get an 48bit number from a bytestream
parse_usize
search_for_u16
Search for a certain number of type u16 in a bytestream
u8_to_u16
Restore a vector of u16 from a vector of u8
u8_to_u16_14bit
Restore a vector of u16 from a vector of u8
u8_to_u16_err_check
Restore a vector of u16 from a vector of u8, using the first 2 bits of each u16 to get channel/cell error bit information
u16_to_u8
Convert a vector of u16 into a vector of u8