pub enum SkiffWireType {
Show 20 variants
Nothing,
Boolean,
Int8,
Int16,
Int32,
Int64,
Int128,
Int256,
Uint8,
Uint16,
Uint32,
Uint64,
Double,
String32,
Yson32,
Variant8,
Variant16,
RepeatedVariant8,
RepeatedVariant16,
Tuple,
}Expand description
A Skiff encoding used by one schema node.
Variants§
Nothing
Empty payload; valid only as a variant child.
Boolean
One byte, zero or one.
Int8
One signed byte.
Int16
Two little-endian signed bytes.
Int32
Four little-endian signed bytes.
Int64
Eight little-endian signed bytes.
Int128
Sixteen little-endian signed bytes.
Int256
Thirty-two little-endian signed bytes.
Uint8
One unsigned byte.
Uint16
Two little-endian unsigned bytes.
Uint32
Four little-endian unsigned bytes.
Uint64
Eight little-endian unsigned bytes.
Double
Eight-byte IEEE 754 floating-point number.
String32
A little-endian u32 length followed by arbitrary bytes.
Yson32
A little-endian u32 length followed by binary YSON bytes.
Variant8
An eight-bit child tag followed by that child’s value.
Variant16
A sixteen-bit child tag followed by that child’s value.
RepeatedVariant8
A sequence of variant8 values ending in tag 0xff.
RepeatedVariant16
A sequence of variant16 values ending in tag 0xffff.
Tuple
The concatenation of its children’s values.
Implementations§
Source§impl WireType
impl WireType
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
The protocol spelling used in a Skiff schema’s wire_type field.
Sourcepub fn parse(value: &str) -> Option<WireType>
pub fn parse(value: &str) -> Option<WireType>
Parses the protocol spelling used in a Skiff schema.
Sourcepub const fn is_simple(self) -> bool
pub const fn is_simple(self) -> bool
Whether this type is a simple payload rather than a schema container.
Sourcepub const fn fixed_width(self) -> Option<usize>
pub const fn fixed_width(self) -> Option<usize>
The fixed payload width, or None for variable-width/container types.