diff options
author | lafleur <lafleur@boum.org> | 2021-11-28 16:42:27 +0100 |
---|---|---|
committer | lafleur <lafleur@boum.org> | 2021-11-28 16:42:27 +0100 |
commit | 100e365bc653089d54319355a8dea99b28a77a15 (patch) | |
tree | 552b5c9dfc79e1030be31fff514f67211839c31c /src/batch.rs | |
parent | 8a41f1de700b573afb5051abaac22f1094ae21ad (diff) |
docstrings update + typography
Diffstat (limited to 'src/batch.rs')
-rw-r--r-- | src/batch.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/batch.rs b/src/batch.rs index c8ec5aa..198e8d0 100644 --- a/src/batch.rs +++ b/src/batch.rs @@ -5,7 +5,7 @@ use std::os::raw::c_char; use std::ptr; use thiserror::Error; -/// Error while communicating with netlink +/// Error while communicating with netlink. #[derive(Error, Debug)] #[error("Error while communicating with netlink")] pub struct NetlinkError(()); @@ -67,9 +67,9 @@ impl Batch { self.next() } - /// Adds all the messages in the given iterator to this batch. If any message fails to be added - /// the error for that failure is returned and all messages up until that message stays added - /// to the batch. + /// Adds all the messages in the given iterator to this batch. If any message fails to be + /// added the error for that failure is returned and all messages up until that message stay + /// added to the batch. pub fn add_iter<T, I>(&mut self, msg_iter: I, msg_type: MsgType) where T: NlMsg, @@ -192,9 +192,8 @@ impl<'a> Iterator for Iter<'a> { } } -/// selected batch page is 256 Kbytes long to load ruleset of -/// half a million rules without hitting -EMSGSIZE due to large -/// iovec. +/// Selected batch page is 256 Kbytes long to load ruleset of half a million rules without hitting +/// -EMSGSIZE due to large iovec. pub fn default_batch_page_size() -> u32 { unsafe { libc::sysconf(libc::_SC_PAGESIZE) as u32 * 32 } } |