rl_lang/docs/entries/stdlib/net/tcp_write.rs
1use crate::docs::entry::FnEntry;
2
3pub static TCP_WRITE: FnEntry = FnEntry {
4 signature: "tcp_write(stream, data)",
5 description: "writes `data` to a TCP stream, returning the number of bytes written",
6 example: r#"
7get std::net::tcp_write
8
9result_unwrap(tcp_write(stream, "hello\n"))"#,
10 expected_output: None,
11 returns: "Result[int]",
12 errors: Some("Err(string) on a write error"),
13 see_also: &["tcp_read"],
14 since: Some("v0.1.5"),
15};