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

A signed integer, in machine-native representation.

An unsigned integer, in machine-native representation.

A UTF-8–encoded string.

A network address, which can have its own special encoding.

Fields of Address

A sub-object is an ordered set of (name,value) tuples.

Raw bytes, e.g., a checksum or just unparsed data.

Methods

impl Val
[src]

Trait Implementations

impl Display for Val
[src]

Formats the value using the given formatter. Read more