zlubsen / dis-rs

Implementation of DIS in Rust
MIT License
14 stars 6 forks source link

Provide addition impl for dis_rs::model::EntityType #18

Closed carlocorradini closed 8 months ago

carlocorradini commented 8 months ago

Provide the following implementations for dis_rs::model::EntityType:

Examples:

let entity_type: dis_rs::model::EntityType = dis_rs::model::EntityType::from_str("0:1:2:3:4:5:6").unwrap();
let entity_type: dis_rs::model::EntityType = "0:1:2:3:4:5:6".try_into().unwrap();
let entity_type: dis_rs::model::EntityType = "0:1:2:3:4:5:6".to_string().try_into().unwrap();
println!("{entity_type}"); // 0:1:2:3:4:5:6

I'll try to provide a PR ASAP. Let me know what you think.

zlubsen commented 8 months ago

Those would be very logical and useful trait implementations.

zlubsen commented 8 months ago

Thanks!

carlocorradini commented 8 months ago

@zlubsen Thanks! Awesome library 🤯