Function bincode_core::serialize [−][src]
pub fn serialize<T: Serialize + ?Sized, W: CoreWrite, O: Options>(
value: &T,
writer: W,
options: O
) -> Result<(), SerializeError<W>>
Serialize a given T
type into a given CoreWrite
writer with the given B
byte order.
T
can be any value that derives serde::Serialize
.
W
can be any value that implements CoreWrite. This can e.g. be a fixed-size array, or a
serial writer.
B
can be any type that implements byteorder::ByteOrder. This includes:
- BigEndian
- LittleEndian
- NetworkEndian.