| Crates.io | can-type-rs |
| lib.rs | can-type-rs |
| version | 1.0.8 |
| created_at | 2024-07-06 07:47:18.976299+00 |
| updated_at | 2024-08-23 15:08:07.048014+00 |
| description | CAN type define. |
| homepage | https://github.com/zhuyu4839/can-type-rs |
| repository | https://github.com/zhuyu4839/can-type-rs |
| max_upload_size | |
| id | 1293836 |
| size | 80,184 |
CanMessage exampleuse 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