1
1
//! Encoding of [`LogMsg`]es as a binary stream, e.g. to store in an `.rrd` file, or send over network.
2
2
3
- use crate :: codec;
4
- use crate :: codec:: file:: { self , encoder} ;
5
- use crate :: FileHeader ;
6
- use crate :: LegacyMessageHeader ;
7
- use crate :: Serializer ;
8
- use crate :: { Compression , EncodingOptions } ;
9
3
use re_build_info:: CrateVersion ;
10
4
use re_chunk:: { ChunkError , ChunkResult } ;
11
5
use re_log_types:: LogMsg ;
12
6
7
+ use crate :: {
8
+ codec:: {
9
+ self ,
10
+ file:: { self , encoder} ,
11
+ } ,
12
+ Compression , EncodingOptions , FileHeader , Serializer ,
13
+ } ;
14
+
13
15
// ----------------------------------------------------------------------------
14
16
15
17
/// On failure to encode or serialize a [`LogMsg`].
@@ -161,7 +163,7 @@ impl<W: std::io::Write> Encoder<W> {
161
163
. map ( |_| self . scratch . len ( ) as _ )
162
164
. map_err ( EncodeError :: Write )
163
165
}
164
- Serializer :: MsgPack => Err ( EncodeError :: CannotEncodeWithMsgPack ) ,
166
+ Serializer :: LegacyMsgPack => Err ( EncodeError :: CannotEncodeWithMsgPack ) ,
165
167
}
166
168
}
167
169
@@ -170,7 +172,7 @@ impl<W: std::io::Write> Encoder<W> {
170
172
#[ inline]
171
173
pub fn finish ( & mut self ) -> Result < ( ) , EncodeError > {
172
174
match self . serializer {
173
- Serializer :: MsgPack => {
175
+ Serializer :: LegacyMsgPack => {
174
176
return Err ( EncodeError :: CannotEncodeWithMsgPack ) ;
175
177
}
176
178
Serializer :: Protobuf => {
0 commit comments