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

Function write_f32

src/encode.rs:591–596  ·  view source on GitHub ↗

Encodes and attempts to write an `f32` value as a 5-byte sequence into the given write. The first byte becomes the `f32` marker and the others will represent the data itself. # Errors This function will return `ValueWriteError` on any I/O error occurred while writing either the marker or the data, except the EINTR, which is handled internally.

(wr: &mut W, val: f32)

Source from the content-addressed store, hash-verified

589/// This function will return `ValueWriteError` on any I/O error occurred while writing either the
590/// marker or the data, except the EINTR, which is handled internally.
591pub fn write_f32<W>(wr: &mut W, val: f32) -> Result<(), ValueWriteError>
592 where W: Write
593{
594 try!(write_marker(wr, Marker::F32));
595 write_data_f32(wr, val)
596}
597
598/// Encodes and attempts to write an `f64` value as a 9-byte sequence into the given write.
599///

Callers 5

write_valueFunction · 0.85
emit_f32Method · 0.85
visit_f32Method · 0.85
write_value_refFunction · 0.85
pass_pack_f32Function · 0.85

Calls 1

write_markerFunction · 0.85

Tested by 1

pass_pack_f32Function · 0.68