add subs_debug

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-12-29 20:44:03 -05:00
parent eeab1666e7
commit 612c89118f
5 changed files with 298 additions and 1 deletions

View File

@@ -8,6 +8,12 @@ pub struct CommandResult<'a> {
message: &'a str,
}
pub fn calculate_command_result_size(result: &CommandResult) -> usize {
std::mem::size_of_val(result)
+ result.event_id.as_bytes().len()
+ result.message.as_bytes().len()
}
#[derive(Debug, Eq, PartialEq)]
pub enum RelayMessage<'a> {
OK(CommandResult<'a>),