Implement yunq server in rust.

This commit is contained in:
Drew Galbraith 2024-07-31 19:59:46 -07:00
parent dbc4e7e2ad
commit 76f8795a46
12 changed files with 312 additions and 23 deletions

View file

@ -28,5 +28,11 @@ pub fn call_endpoint<Req: YunqMessage, Resp: YunqMessage, const N: usize>(
cap_buffer.as_mut_slice(),
)?;
let resp_code: u64 = byte_buffer.at(8)?;
if resp_code != 0 {
return Err(ZError::from(resp_code));
}
Ok(Resp::parse_from_request(&byte_buffer, &cap_buffer)?)
}