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

Function write_i64

src/encode.rs:461–466  ·  view source on GitHub ↗

Encodes and attempts to write an `i64` value 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 fixnum. Also note, that the first byte will always be the i16 marker (`0xd3`). I

(wr: &mut W, val: i64)

Source from the content-addressed store, hash-verified

459/// This function will return `ValueWriteError` on any I/O error occurred while writing either the
460/// marker or the data, except the EINTR, which is handled internally.
461pub fn write_i64<W>(wr: &mut W, val: i64) -> Result<(), ValueWriteError>
462 where W: Write
463{
464 try!(write_marker(wr, Marker::I64));
465 write_data_i64(wr, val)
466}
467
468/// Encodes and attempts to write an `u64` value into the given write using the most efficient
469/// representation, returning the marker used.

Callers 3

write_sintFunction · 0.85
write_sint_effFunction · 0.85
pass_pack_i64Function · 0.85

Calls 1

write_markerFunction · 0.85

Tested by 1

pass_pack_i64Function · 0.68