Skip to content

Make CanFrame and CanFdFrame more rustic #1

@Kixunil

Description

@Kixunil

Currently these structures expose potentially invalid (uninitialized) data. This should be avoided in Rust. I'd suggest to make data and dlc fields private and provide data() method returning slice. Further, provide push_byte() and push_slice() methods for appending bytes.

Also data should probably use MaybeUninit<u8> instead of u8, but only after MaybeUninit is stabilized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions