diff --git a/src/err.rs b/src/err.rs index 91e8e238..ff36e625 100644 --- a/src/err.rs +++ b/src/err.rs @@ -1,11 +1,11 @@ //! This is the module that contains the error types used in `neli` //! //! There are five main types: -//! * [`Nlmsgerr`][crate::err::Nlmsgerr] - an application error +//! * [`Nlmsgerr`] - an application error //! returned from netlink as a packet. -//! * [`RouterError`][crate::err::RouterError] - errors returned by +//! * [`RouterError`] - errors returned by //! [`NlRouter`][crate::router::synchronous::NlRouter]. -//! * [`SocketError`][crate::err::SocketError] - errors returned by +//! * [`SocketError`] - errors returned by //! [`NlSocketHandle`][crate::socket::synchronous::NlSocketHandle]. //! * [`DeError`] - error while deserializing //! * [`SerError`] - error while serializing @@ -533,7 +533,7 @@ impl From for SocketError { impl SocketError { /// Create new error from a data type implementing - /// [`Display`][std::fmt::Display] + /// [`Display`] pub fn new(s: D) -> Self where D: Display, @@ -645,13 +645,13 @@ pub enum DeError { Io(ErrorKind), /// String UTF conversion error. Utf8(Utf8), - /// Invalid input parameter for [`FromBytesWithInput`][crate::FromBytesWithInput]. + /// Invalid input parameter for [`FromBytesWithInput`]. InvalidInput(usize), } impl DeError { /// Create new error from a type implementing - /// [`Display`][std::fmt::Display] + /// [`Display`] pub fn new(s: D) -> Self where D: Display, diff --git a/src/genl.rs b/src/genl.rs index 5bed5ff5..088c1903 100644 --- a/src/genl.rs +++ b/src/genl.rs @@ -1,17 +1,16 @@ //! This module contains generic netlink parsing data structures. -//! This is all handled by the [`Genlmsghdr`][crate::genl::Genlmsghdr] +//! This is all handled by the [`Genlmsghdr`] //! header struct which contains all of the information needed for //! the generic netlink layer. //! //! # Design decisions //! //! The generic netlink `attrs` field has been changed to a -//! [`GenlBuffer`][crate::types::GenlBuffer] of -//! [`Nlattr`][crate::genl::Nlattr]s instead of the +//! [`GenlBuffer`] of [`Nlattr`]s instead of the //! original [`Vec`][Vec] to allow simpler parsing at the top -//! level when one [`Nlattr`][crate::genl::Nlattr] structure is not +//! level when one [`Nlattr`] structure is not //! nested within another, a use case that is instead handled using -//! [`AttrHandle`][crate::attr::AttrHandle]. +//! [`AttrHandle`]. use std::io::Cursor; diff --git a/src/iter.rs b/src/iter.rs index 31d442ea..1b6c61c9 100644 --- a/src/iter.rs +++ b/src/iter.rs @@ -29,7 +29,7 @@ where } /// Optional method for parsing messages of varied types in the same buffer. Models - /// the [`Iterator`][Iterator] API. + /// the [`Iterator`] API. pub fn next_typed(&mut self) -> Option, SocketError>> where TT: NlType, diff --git a/src/nl.rs b/src/nl.rs index bbdfcd76..f147632b 100644 --- a/src/nl.rs +++ b/src/nl.rs @@ -1,13 +1,13 @@ //! This module contains the top level netlink header code. Every //! netlink message will be encapsulated in a top level `Nlmsghdr`. //! -//! [`Nlmsghdr`][crate::nl::Nlmsghdr] is the structure representing a +//! [`Nlmsghdr`] is the structure representing a //! header that all netlink protocols require to be passed to the //! correct destination. //! //! # Design decisions //! -//! Payloads for [`Nlmsghdr`][crate::nl::Nlmsghdr] can be any type. +//! Payloads for [`Nlmsghdr`] can be any type. //! //! The payload is wrapped in an enum to facilitate better //! application-level error handling. diff --git a/src/router/mod.rs b/src/router/mod.rs index e0921f02..c1cb228c 100644 --- a/src/router/mod.rs +++ b/src/router/mod.rs @@ -10,7 +10,7 @@ //! to the request. //! * Errors in packet reception and parsing are broadcast to all receivers. //! * An [`NlRouterReceiverHandle`][crate::router::synchronous::NlRouterReceiverHandle] -//! can be used as an iterator and will return [`None`][None] either when all +//! can be used as an iterator and will return [`None`] either when all //! messages corresponding to the request have been received or there is a fatal error. //! //! ## Design decisions diff --git a/src/router/synchronous.rs b/src/router/synchronous.rs index 4db96480..ab65db06 100644 --- a/src/router/synchronous.rs +++ b/src/router/synchronous.rs @@ -418,7 +418,7 @@ where T: NlType, P: Size + FromBytesWithInput, { - /// Imitates the [`Iterator`][Iterator] API but allows parsing differently typed + /// Imitates the [`Iterator`] API but allows parsing differently typed /// messages in a sequence of messages meant for this receiver. pub fn next_typed(&mut self) -> Option, RouterError>> where diff --git a/src/rtnl.rs b/src/rtnl.rs index e7afbe2e..71381dca 100644 --- a/src/rtnl.rs +++ b/src/rtnl.rs @@ -319,7 +319,7 @@ where Ok(()) } - /// Return an [`AttrHandle`][crate::attr::AttrHandle] for + /// Return an [`AttrHandle`] for /// attributes nested in the given attribute payload. pub fn get_attr_handle(&self) -> Result, DeError> where diff --git a/src/socket/synchronous.rs b/src/socket/synchronous.rs index 7b6e5cbd..2ec394c5 100644 --- a/src/socket/synchronous.rs +++ b/src/socket/synchronous.rs @@ -81,7 +81,7 @@ impl NlSocketHandle { Ok(()) } - /// Convenience function to read a stream of [`Nlmsghdr`][crate::nl::Nlmsghdr] + /// Convenience function to read a stream of [`Nlmsghdr`] /// structs one by one using an iterator. /// /// Returns [`None`] when the stream of messages has been completely processed in @@ -103,13 +103,13 @@ impl NlSocketHandle { Ok((NlBufferIter::new(Cursor::new(buffer)), groups)) } - /// Parse all [`Nlmsghdr`][crate::nl::Nlmsghdr] structs sent in + /// Parse all [`Nlmsghdr`] structs sent in /// one network packet and return them all in a list. /// /// Failure to parse any packet will cause the entire operation /// to fail. If an error is detected at the application level, /// this method will discard any non-error - /// [`Nlmsghdr`][crate::nl::Nlmsghdr] structs and only return the + /// [`Nlmsghdr`] structs and only return the /// error. For a more granular approach, use [`NlSocketHandle::recv`]. pub fn recv_all(&self) -> Result<(NlBuffer, Groups), SocketError> where