Example yunq implementation for one Yellowstone endpoint.

This commit is contained in:
Drew Galbraith 2024-07-26 23:36:07 -07:00
parent 51d40f6db6
commit 3eea4d811a
11 changed files with 301 additions and 3 deletions

View file

@ -0,0 +1,23 @@
use crate::buffer::ByteBuffer;
use alloc::vec::Vec;
use mammoth::syscall::z_cap_t;
use mammoth::syscall::ZError;
pub const MESSAGE_IDENT: u32 = 0x33441122;
pub trait YunqMessage {
fn parse<const N: usize>(
buf: &ByteBuffer<N>,
offset: usize,
caps: &Vec<z_cap_t>,
) -> Result<Self, ZError>
where
Self: Sized;
fn serialize<const N: usize>(
&self,
buf: &mut ByteBuffer<N>,
offset: usize,
caps: &mut Vec<z_cap_t>,
) -> Result<usize, ZError>;
}