Skip to content

Intra-doc links #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
language: rust
# TODO: put stable and beta back in once slice_pattern lands in stable
rust:
# - stable
# - beta
- nightly
- stable
- beta
- nightly

cache: cargo

script:
- cargo test --verbose
- cargo build --features serde
- cargo build --features std
14 changes: 9 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,15 @@
name = "no-std-net"
description = "Rust's std::net... without the 'std'."
version = "0.5.0"
authors = [ "M@ Dunlap <[email protected]>" ]
categories = [ "embedded", "network-programming", "no-std" ]
authors = ["M@ Dunlap <[email protected]>"]
categories = [
"embedded",
"network-programming",
"no-std",
]
repository = "https://github.com/dunmatt/no-std-net"
license = "MIT"
readme = "README.md"

[badges]
maintenance = { status = "actively-developed" }
Expand All @@ -18,7 +23,6 @@ serde = { version = "^1", default-features = false, optional = true }
serde_test = "^1"

[features]
default = [ ]

std = []
# Deprecated. Does nothing.
i128 = [ ]
i128 = []
53 changes: 23 additions & 30 deletions src/addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ use {IpAddr, Ipv4Addr, Ipv6Addr};
/// as possibly some version-dependent additional information. See [`SocketAddrV4`]'s and
/// [`SocketAddrV6`]'s respective documentation for more details.
///
/// [IP address]: ../../no-std-net/enum.IpAddr.html
/// [`SocketAddrV4`]: ../../no-std-net/struct.SocketAddrV4.html
/// [`SocketAddrV6`]: ../../no-std-net/struct.SocketAddrV6.html
/// [IP address]: IpAddr
///
/// # Examples
///
Expand All @@ -38,7 +36,7 @@ pub enum SocketAddr {
impl SocketAddr {
/// Creates a new socket address from an [IP address] and a port number.
///
/// [IP address]: ../../no-std-net/enum.IpAddr.html
/// [IP address]: IpAddr
///
/// # Examples
///
Expand Down Expand Up @@ -131,10 +129,8 @@ impl SocketAddr {
/// Returns [`true`] if the [IP address] in this `SocketAddr` is an
/// [IPv4 address], and [`false`] otherwise.
///
/// [`true`]: ../../std/primitive.bool.html
/// [`false`]: ../../std/primitive.bool.html
/// [IP address]: ../../no-std-net/enum.IpAddr.html
/// [IPv4 address]: ../../no-std-net/enum.IpAddr.html#variant.V4
/// [IP address]: IpAddr
/// [`IPv4` address]: IpAddr::V4
///
/// # Examples
///
Expand All @@ -157,10 +153,8 @@ impl SocketAddr {
/// Returns [`true`] if the [IP address] in this `SocketAddr` is an
/// [IPv6 address], and [`false`] otherwise.
///
/// [`true`]: ../../std/primitive.bool.html
/// [`false`]: ../../std/primitive.bool.html
/// [IP address]: ../../no-std-net/enum.IpAddr.html
/// [IPv6 address]: ../../no-std-net/enum.IpAddr.html#variant.V6
/// [IP address]: IpAddr
/// [`IPv6` address]: IpAddr::V6
///
/// # Examples
///
Expand Down Expand Up @@ -190,8 +184,7 @@ impl SocketAddr {
/// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses.
///
/// [IETF RFC 793]: https://tools.ietf.org/html/rfc793
/// [IPv4 address]: ../../no-std-net/struct.Ipv4Addr.html
/// [`SocketAddr`]: ../../no-std-net/enum.SocketAddr.html
/// [`IPv4` address]: Ipv4Addr
///
/// # Examples
///
Expand All @@ -213,7 +206,7 @@ pub struct SocketAddrV4 {
impl SocketAddrV4 {
/// Creates a new socket address from an [IPv4 address] and a port number.
///
/// [IPv4 address]: ../../no-std-net/struct.Ipv4Addr.html
/// [`IPv4` address]: Ipv4Addr
///
/// # Examples
///
Expand Down Expand Up @@ -297,8 +290,7 @@ impl SocketAddrV4 {
/// See [`SocketAddr`] for a type encompassing both IPv4 and IPv6 socket addresses.
///
/// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3
/// [IPv6 address]: ../../no-std-net/struct.Ipv6Addr.html
/// [`SocketAddr`]: ../../no-std-net/enum.SocketAddr.html
/// [`IPv6` address]: Ipv6Addr
///
/// # Examples
///
Expand Down Expand Up @@ -327,7 +319,7 @@ impl SocketAddrV6 {
/// parameters, see [IETF RFC 2553, Section 3.3].
///
/// [IETF RFC 2553, Section 3.3]: https://tools.ietf.org/html/rfc2553#section-3.3
/// [IPv6 address]: ../../no-std-net/struct.Ipv6Addr.html
/// [`IPv6` address]: Ipv6Addr
///
/// # Examples
///
Expand Down Expand Up @@ -568,18 +560,19 @@ impl ::fmt::Debug for SocketAddrV6 {
/// Addresses returned by the operating system that are not IP addresses are
/// silently ignored.
///
/// [`FromStr`]: ../../std/str/trait.FromStr.html
/// [`IpAddr`]: ../../no-std-net/enum.IpAddr.html
/// [`Ipv4Addr`]: ../../no-std-net/struct.Ipv4Addr.html
/// [`Ipv6Addr`]: ../../no-std-net/struct.Ipv6Addr.html
/// [`SocketAddr`]: ../../no-std-net/enum.SocketAddr.html
/// [`SocketAddrV4`]: ../../no-std-net/struct.SocketAddrV4.html
/// [`SocketAddrV6`]: ../../no-std-net/struct.SocketAddrV6.html
/// [`&str`]: ../../std/primitive.str.html
/// [`TcpStream`]: ../../no-std-net/struct.TcpStream.html
/// [`to_socket_addrs`]: #tymethod.to_socket_addrs
/// [`UdpSocket`]: ../../no-std-net/struct.UdpSocket.html
/// [`u16`]: ../../std/primitive.u16.html
/// [`FromStr`]: core::str::FromStr
/// [`&str`]: str
#[cfg_attr(feature = "std", doc = "[`TcpStream`]: std::net::TcpStream")]
#[cfg_attr(
not(feature = "std"),
doc = "[`TcpStream`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html"
)]
/// [`to_socket_addrs`]: ToSocketAddrs::to_socket_addrs
#[cfg_attr(feature = "std", doc = "[`UdpSocket`]: std::net::UdpSocket")]
#[cfg_attr(
not(feature = "std"),
doc = "[`UdpSocket`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html"
)]
///
pub trait ToSocketAddrs {
/// Returned iterator over socket addresses which this type may correspond to.
Expand Down
Loading