summaryrefslogtreecommitdiff
path: root/src/codec/decode.rs
diff options
context:
space:
mode:
authorzirkonya <zirkonya@iridium.lan>2026-08-25 18:41:28 +0200
committerzirkonya <zirkonya@iridium.lan>2026-08-25 18:41:28 +0200
commit8bae725a803ee00bf5bc86b9fc0be6853b95115e (patch)
tree1a62d1f61191fb3993a1e3d81f34653fe7a10991 /src/codec/decode.rs
parent7297bbb864778814ed59e99d0d6b05853704f06d (diff)
Add getset ; prepare event and backend
Diffstat (limited to 'src/codec/decode.rs')
-rw-r--r--src/codec/decode.rs3
1 files changed, 3 insertions, 0 deletions
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<Ctx> Decode<Ctx> for $type {
+ // decode number using big endian
fn decode(reader: &mut dyn Read, _: &mut Ctx) -> Result<Self>
where
Self: Sized,
@@ -18,6 +20,7 @@ macro_rules! impl_decode {
};
}
+/// Read a value from a byte stream
pub trait Decode<Ctx> {
fn decode(reader: &mut dyn Read, ctx: &mut Ctx) -> Result<Self>
where