blob: ad47d305ac3ade37d6e4de2fbb97cc4c1680f3a5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Generated by hobgoblin.
pub fn encode_bool(value: &::core::primitive::bool, writer: &mut impl std::io::Write) {
todo!();
}
pub fn decode_bool(reader: &mut impl std::io::Read) -> ::core::primitive::bool {
todo!()
}
pub fn encode_int_32(value: &::core::primitive::i32, writer: &mut impl std::io::Write) {
writer.write_all(&value.to_le_bytes());
}
pub fn decode_int_32(reader: &mut impl std::io::Read) -> ::core::primitive::i32 {
let bytes = {
let mut bytes = [0; 4];
reader.read_exact(&mut bytes);
bytes
};
::core::primitive::i32::from_le_bytes(bytes)
}
pub fn encode_int_64(value: &::core::primitive::i64, writer: &mut impl std::io::Write) {
writer.write_all(&value.to_le_bytes());
}
pub fn decode_int_64(reader: &mut impl std::io::Read) -> ::core::primitive::i64 {
let bytes = {
let mut bytes = [0; 8];
reader.read_exact(&mut bytes);
bytes
};
::core::primitive::i64::from_le_bytes(bytes)
}
pub fn encode_string(value: &::std::string::String, writer: &mut impl std::io::Write) {
todo!();
}
pub fn decode_string(reader: &mut impl std::io::Read) -> ::std::string::String {
todo!()
}
|