MCPcopy Create free account
hub / github.com/chirpstack/chirpstack / PayloadCodec

Interface PayloadCodec

lrwn/src/maccommand.rs:14–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12use crate::helpers::{decode_freq, encode_freq};
13
14pub trait PayloadCodec<Struct = Self> {
15 fn decode(cur: &mut Cursor<Vec<u8>>) -> Result<Struct>;
16 fn encode(&self) -> Result<Vec<u8>>;
17}
18
19#[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)]
20#[cfg_attr(feature = "serde", derive(Serialize))]

Callers

nothing calls this directly

Implementers 1

maccommand.rslrwn/src/maccommand.rs

Calls

no outgoing calls

Tested by

no test coverage detected