Module slice

Source
Expand description

Serialization primitives for slices.

Structs§

HexOrBin
Serializer/deserializer newtype which encodes bytes as either binary or hex.

Functions§

deserialize_hex_or_bin
Deserialize from hex when using human-readable formats or binary if the format is binary. Fails if the buffer is smaller then the resulting slice.
deserialize_hex_or_bin_vec
Deserialize from hex when using human-readable formats or binary if the format is binary.
serialize_hex_lower_or_bin
Serialize the given type as lower case hex when using human-readable formats or binary if the format is binary.
serialize_hex_upper_or_bin
Serialize the given type as upper case hex when using human-readable formats or binary if the format is binary.

Type Aliases§

HexLowerOrBin
HexOrBin serializer which uses lower case.
HexUpperOrBin
HexOrBin serializer which uses upper case.