MCPcopy Create free account
hub / github.com/3Hren/msgpack-rust / write_u64

Function write_u64

src/encode.rs:359–364  ·  view source on GitHub ↗

Encodes and attempts to write an `u64` value strictly as a 9-byte sequence into the given write. The first byte becomes the marker and the others will represent the data itself. Note, that this function will encode the given value in 9-byte sequence no matter what, even if the value can be represented using single byte as a positive fixnum. If you need to fit the given buffer efficiently use `w

(wr: &mut W, val: u64)

Source from the content-addressed store, hash-verified

357/// This function will return `ValueWriteError` on any I/O error occurred while writing either the
358/// marker or the data, except the EINTR, which is handled internally.
359pub fn write_u64<W>(wr: &mut W, val: u64) -> Result<(), ValueWriteError>
360 where W: Write
361{
362 try!(write_marker(wr, Marker::U64));
363 write_data_u64(wr, val)
364}
365
366/// Encodes and attempts to write an `i8` value as a 2-byte sequence into the given write.
367///

Callers 2

write_uintFunction · 0.85
pass_pack_u64Function · 0.85

Calls 1

write_markerFunction · 0.85

Tested by 1

pass_pack_u64Function · 0.68