| Crates.io | bog |
| lib.rs | bog |
| version | 0.1.0 |
| created_at | 2024-08-07 12:23:49.510799+00 |
| updated_at | 2024-08-07 12:23:49.510799+00 |
| description | The highly-modular abstraction standard |
| homepage | https://github.com/rtthw/bog |
| repository | https://github.com/rtthw/bog |
| max_upload_size | |
| id | 1328377 |
| size | 46,791 |
The highly-modular abstraction standard.
The recommended design pattern to be used with this library is the basic type definition wrapper...
type Position = bog::Xy<u16>;
And implementing custom features should be done through extension traits...
trait PositionImpl {
fn custom_x_getter(&self) -> u16;
}
impl PositionImpl for Position {
fn custom_x_getter(&self) -> u16 {
self.x
}
}
With the following results...
let pos_a = Position::new(1, 2);
assert_eq!(pos_a.custom_x_getter(), 1);
| Name | Rect | X-Y | X-Y-Z |
|---|---|---|---|
default |
✔ | ✔ | |
all |
✔ | ✔ | ✔ |
rect |
✔ | ||
xy |
✔ | ||
xyz |
✔ |