trafix_codec/message/field/value/
mod.rs1use crate::decoder::num::ParseFixInt;
4
5pub mod aliases;
6pub mod begin_string;
7pub mod msg_type;
8
9pub(crate) trait FromFixBytes {
13 type Error<'lifetime>;
15
16 fn from_fix_bytes(bytes: &[u8]) -> Result<Self, Self::Error<'_>>
18 where
19 Self: Sized;
20}
21
22impl<T> FromFixBytes for T
23where
24 T: ParseFixInt,
25{
26 type Error<'unused> = crate::decoder::num::ParseIntError;
27
28 fn from_fix_bytes(bytes: &[u8]) -> Result<Self, Self::Error<'_>>
29 where
30 Self: Sized,
31 {
32 Self::parse_fix_int(bytes)
33 }
34}