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

@@ -31,3 +31,14 @@ pub fn create_pda<'a, 'info>(
)?;
Ok(())
}
#[macro_export]
macro_rules! impl_to_bytes {
($struct_name:ident) => {
impl $struct_name {
pub fn to_bytes(&self) -> &[u8] {
bytemuck::bytes_of(self)
}
}
};
}