[][src]Crate on_wire

Structs

BytesS

This tells the compiler to just read/write the raw bytes over the wire

FromS

This causes values to be serialized and deserialized using rusts From and Into traits. This is nice for a quick proof of concept as these types are widely supported in the rust ecosystem, but are liable to change their encoding format without warning between compiler/library versions.

Traits

FromWire

There are a lot of different ways of communicating with canisters and there's a lot of different ways of encoding those communications. Below is a non exhaustive list of the two and the Cartesian product of functions that we were creating.

IntoWire
NewType

Functions

bytes

This tells communication function that you'd like you communicate using raw bytes

from

This tells communication function that you'd like you communicate using FromS

witness

Every witness is a type specialization of this function The function itself should be a runtime no op Witnesses eliminate ambiguity in internally polymorphic functions, this witness is useless as it removes no ambiguity When rust gets higher order types we can remove this function