read_to_end
fn read_to_end(Stream s) -> Result<Vec<byte>, IoError> Import
Source: use io::sync::{read_to_end}; src/io/sync.hy Reads from s until it ends and returns everything read.
Parameters#
| Name | Type |
|---|---|
s | Stream |
Returns#
Result<Vec<byte>, IoError>
See also#
write_all: Writes all ofbuftos, waiting whenever the stream is not ready.read_exact: Fills all ofbuffroms, waiting whenever no data is ready.accept_wait: Waits for the next connection on a TCPlistenerand returns its stream.recv_from_wait: Waits for a UDP datagram, reads it intobuf, and returns(bytes, sender host, sender port).send_to_wait: Sendsbufas one UDP datagram tohost:port, waiting while the socket is not ready.copy: Copies the filesrctodst.print: Writessto standard output, without a newline.println: Writessand a newline to standard output.