pub fn read_body<T: Readable>(h: &MsgHeader, stream: &mut dyn Read) -> Result<T, Error> {
	let mut body = vec![0u8; h.msg_len as usize];
	read_exact(stream, &mut body, time::Duration::from_secs(20), true)?;
	ser::deserialize(&mut &body[..]).map_err(From::from)
}
/// Read a message body from the provided stream, always blocking
/// until we have a result (or timeout).
Read a message body from the provided stream, always blocking
until we have a result (or timeout).
Read a message body from the provided stream always blocking until we have a result ( or timeout ) .
pub fn read_body<T: Readable>(h: &MsgHeader, stream: &mut dyn Read) -> Result<T, Error> {
	let mut body = vec![0u8; h.msg_len as usize];
	read_exact(stream, &mut body, time::Duration::from_secs(20), true)?;
	ser::deserialize(&mut &body[..]).map_err(From::from)
}
pub fn read_body < T : Readable > ( h : & MsgHeader , stream : & mut dyn Read ) -> Result < T , Error > { let mut body = vec ! [ 0u8 h msg_len as usize ] ; read_exact ( stream , & mut body , time :: Duration :: from_secs ( 20 ) , true ) ? ; ser :: deserialize ( & mut & body [ .. ] ) . map_err ( From :: from ) }
Read a message body from the provided stream, always blocking
until we have a result (or timeout).
Read a message body from the provided stream always blocking until we have a result ( or timeout ) .
h
&MsgHeader
stream
&mut dyn Read