This commit is contained in:
Hardhat Chad
2024-02-14 17:01:30 +00:00
parent f917e49b3f
commit bbc1d835ea
21 changed files with 248 additions and 171 deletions

View File

@@ -1,5 +1,7 @@
use bytemuck::{Pod, Zeroable};
use crate::impl_to_bytes;
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Bus {
@@ -13,8 +15,4 @@ pub struct Bus {
pub available_rewards: u64,
}
impl Bus {
pub fn to_bytes(&self) -> &[u8] {
bytemuck::bytes_of(self)
}
}
impl_to_bytes!(Bus);