pub enum BinProtRule {
Show 26 variants Nat0, Unit, Bool, String, Char, Int, Int32, Int64, NativeInt, Float, Option(Box<BinProtRule>), Record(Vec<RecordField>), Tuple(Vec<BinProtRule>), Sum(Vec<Summand>), Polyvar(Vec<Polyvar>), List(Box<BinProtRule>), Hashtable(HashTblEntry), Vec(usizeBox<BinProtRule>), Bigstring, Reference(RuleRef), TypeVar(String), SelfReference(Vec<BinProtRule>), TypeAbstraction(Vec<String>, Box<BinProtRule>), TypeClosure(Vec<(String, BinProtRule)>, Box<BinProtRule>), Custom(Vec<BinProtRule>), CustomForPath(StringVec<BinProtRule>),
}
Expand description

Recursively defined BinProtRule is how the type tree is constructed

Variants

Nat0

Variable length natural Integer

Unit

Unit type

Bool

Boolean

String

OCaml string type (different to a rust string)

Char

OCaml char type

Int

Variable length integer

Int32

32 bit Integer

Int64

64 bit Integer

NativeInt

OS Native integer

Float

Floating point number

Option(Box<BinProtRule>)

OCaml option

Record(Vec<RecordField>)

records/structs

Tuple(Vec<BinProtRule>)

tuple

Sum(Vec<Summand>)

sum types/enums

Polyvar(Vec<Polyvar>)

τ ≤ Γ(a), τ is an instance of Γ(a) and (Γ(a) a type scheme

List(Box<BinProtRule>)

Variable length list of any BinProt type

Hashtable(HashTblEntry)

Hash table of BinProt types

Vec(usizeBox<BinProtRule>)

fixed length of BinProt types

Bigstring

A set of utils for dealing with bigarrays of char

Reference(RuleRef)

track indirections for debugging

TypeVar(String)

your type

SelfReference(Vec<BinProtRule>)

inside a recursive type, list of type parameters

TypeAbstraction(Vec<String>, Box<BinProtRule>)

parameterized type: ’a t = …

TypeClosure(Vec<(String, BinProtRule)>, Box<BinProtRule>)

recursive parameterized type with bindings

Custom(Vec<BinProtRule>)

Type that does not use standard derived BinProt encoding

CustomForPath(StringVec<BinProtRule>)

does not occur in source files, used in traverse

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.