Skip to content

Commit

Permalink
docs: Improve UdpMetadata doc comments.
Browse files Browse the repository at this point in the history
Fix local_address doc to indicate purpose on outgoing datagrams.

Add rustdoc comment to endpoint field.
  • Loading branch information
willbicks committed Nov 26, 2024
1 parent 4fa52f3 commit ae587fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/socket/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ use crate::wire::{IpAddress, IpEndpoint, IpListenEndpoint, IpProtocol, IpRepr, U
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
pub struct UdpMetadata {
/// The IP endpoint from which an incoming datagram was received, or to which an outgoing
/// datagram will be sent.
pub endpoint: IpEndpoint,
/// The IP address to which an incoming datagram was sent, or to which an outgoing datagram
/// The IP address to which an incoming datagram was sent, or from which an outgoing datagram
/// will be sent. Incoming datagrams always have this set. On outgoing datagrams, if it is not
/// set, and the socket is not bound to a single address anyway, a suitable address will be
/// determined using the algorithms of RFC 6724 (candidate source address selection) or some
Expand Down

0 comments on commit ae587fc

Please sign in to comment.