can-type-rs 1.0.4

CAN type define.
Documentation
can-type-rs-1.0.4 has been yanked.

CAN type define that based from can-types crate

  • CanMessage example
use std::fmt::Display;

pub struct CanMessage {
  // fields of message declare
}

impl Frame for CanMessage {
  type Channel = u8;
  // impl methods that defined in `Frame` trait
}

impl Display for CanMessage {
  fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
      <dyn Frame<Channel=u8> as Display>::fmt(self, f)
  }
}
  • AsyncCanDevice and SyncCanDevice example