From 8bae725a803ee00bf5bc86b9fc0be6853b95115e Mon Sep 17 00:00:00 2001 From: zirkonya Date: Tue, 25 Aug 2026 18:41:28 +0200 Subject: Add getset ; prepare event and backend --- src/codec/decode.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/codec/decode.rs') diff --git a/src/codec/decode.rs b/src/codec/decode.rs index 31ed725..fa4ae95 100644 --- a/src/codec/decode.rs +++ b/src/codec/decode.rs @@ -1,3 +1,4 @@ +//! Decoding: reading protocol values from a byte stream. use std::{io::Read, sync::Arc}; use crate::{DEFAULT_BUFFER_LEN, codec::error::Result}; @@ -5,6 +6,7 @@ use crate::{DEFAULT_BUFFER_LEN, codec::error::Result}; macro_rules! impl_decode { ($type: ty) => { impl Decode for $type { + // decode number using big endian fn decode(reader: &mut dyn Read, _: &mut Ctx) -> Result where Self: Sized, @@ -18,6 +20,7 @@ macro_rules! impl_decode { }; } +/// Read a value from a byte stream pub trait Decode { fn decode(reader: &mut dyn Read, ctx: &mut Ctx) -> Result where -- cgit v1.2.3