can-type-rs

Crates.iocan-type-rs
lib.rscan-type-rs
version1.0.8
sourcesrc
created_at2024-07-06 07:47:18.976299
updated_at2024-08-23 15:08:07.048014
descriptionCAN type define.
homepagehttps://github.com/zhuyu4839/can-type-rs
repositoryhttps://github.com/zhuyu4839/can-type-rs
max_upload_size
id1293836
size80,184
(zhuyu4839)

documentation

README

CAN type define that based from can-types crate

This crate is deprecated. All code is move to isopt-rs

  • 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
Commit count: 14

cargo fmt