Enum rshark::Val
[−]
[src]
pub enum Val { Signed(i64), Unsigned(u64), String(String), Address { bytes: Vec<u8>, encoded: String, }, Object(Vec<NamedValue>), Bytes(Vec<u8>), }
A value parsed from a packet.
TODO
This value type isn't as expressive as would be required for a real Wireshark replacement just yet. Additional needs include:
- tracking original bytes (by reference or by index?)
- supporting error metadata (e.g., "parsed ok but checksum doesn't match")
Variants
Signed(i64)
A signed integer, in machine-native representation.
Unsigned(u64)
An unsigned integer, in machine-native representation.
String(String)
A UTF-8–encoded string.
Address
A network address, which can have its own special encoding.
Fields of Address
bytes: Vec<u8> | |
encoded: String |
Object(Vec<NamedValue>)
A sub-object is an ordered set of (name,value) tuples.
Bytes(Vec<u8>)
Raw bytes, e.g., a checksum or just unparsed data.