Crate ethercrab_wire

Source
Expand description

Traits used to pack/unpack structs and enums from EtherCAT packets on the wire.

This crate is designed for use with ethercrab but can be used standalone too.

While these traits can be implemented by hand as normal, it is recommended to derive them using ethercrab-wire-derive where possible.

§Experimental

This crate is in its early stages and may contain bugs or publish breaking changes at any time. It is in use by ethercrab and is well exercised there, but please use with caution in your own code.

Enums§

WireError
Wire encode/decode errors.

Traits§

EtherCrabWireRead
A type to be received from the wire, according to EtherCAT spec rules (packed bits, little endian).
EtherCrabWireReadSized
A readable type that has a size known at compile time.
EtherCrabWireReadWrite
A type that can be both written to the wire and read back from it.
EtherCrabWireSized
Implemented for types with a known size at compile time.
EtherCrabWireWrite
A type to be sent/received on the wire, according to EtherCAT spec rules (packed bits, little endian).
EtherCrabWireWriteSized
Implemented for writeable types with a known size at compile time.

Derive Macros§

EtherCrabWireRead
Items that can only be read from the wire.
EtherCrabWireReadWrite
Items that can be written to and read from the wire.
EtherCrabWireWrite
Items that can only be written to the wire.