rust/library
bors 187b8131d4 Auto merge of #105394 - Patiga:improve-udpsocket-docs, r=workingjubilee
Improve UdpSocket documentation

I tried working with `UdpSocket` and ran into `EINVAL` errors with no clear indication of what causes the error. Also, it was uncharacteristically hard to figure this module out, compared to other Rust `std` modules.

1. `send` and `send_to` return a `usize` This one is just clarity. Usually, returned `usize`s indicate that the buffer might have only been sent partially. This is not the case with UDP. Since that `usize` must always be `buffer.len()`, I have documented that.

2. `bind` limits `connect` and `send_to` When you bind to a limited address space like localhost, you can only `connect` to addresses in that same address space. Error kind: `AddrNotAvailable`.

3. `connect`ing to localhost locks you to localhost On Linux, if you first `connect` to localhost, subsequent `connect`s to
non-localhost addresses fail. Error kind: `InvalidInput`.

For debugging the third one, it was really hard to find someone else who already had that problem. I only managed to find this thread: https://www.mail-archive.com/netdev@vger.kernel.org/msg159519.html
2023-10-03 20:35:38 +00:00
..
alloc Auto merge of #115546 - SUPERCILEX:patch-2, r=Amanieu 2023-09-30 02:15:19 +00:00
backtrace@99faef833f Bump backtrace to 0.3.69 2023-08-22 15:01:14 -07:00
core Rollup merge of #116361 - eduardosm:bump-stdarch, r=Amanieu 2023-10-03 08:58:50 +02:00
panic_abort Rebase to master 2023-09-22 17:23:33 +05:30
panic_unwind Rename BoxMeUp to PanicPayload. 2023-09-20 19:24:52 +02:00
portable-simd remove repetitive words 2023-07-31 16:13:02 +08:00
proc_macro Auto merge of #116124 - WaffleLapkin:fix-proc-macro-literal-to-string, r=compiler-errors 2023-09-26 03:39:25 +00:00
profiler_builtins Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Auto merge of #105394 - Patiga:improve-udpsocket-docs, r=workingjubilee 2023-10-03 20:35:38 +00:00
stdarch@333e9e9977 Bump stdarch submodule 2023-10-02 23:43:35 +02:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
unwind added support for GNU/Hurd 2023-09-21 17:31:25 +02:00