Skip to content
This repository has been archived by the owner on Oct 26, 2022. It is now read-only.

Cleanup proto visibility #193

Merged
merged 2 commits into from
Nov 10, 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
19 changes: 14 additions & 5 deletions netlink-proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
//! ```rust,no_run
//! use futures::stream::StreamExt;
//! use netlink_packet_audit::{
//! NLM_F_ACK, NLM_F_REQUEST, NetlinkMessage, NetlinkPayload,
//! AuditMessage, StatusMessage,
//! AuditMessage,
//! NetlinkMessage,
//! NetlinkPayload,
//! StatusMessage,
//! NLM_F_ACK,
//! NLM_F_REQUEST,
//! };
//! use std::process;
//!
//! use netlink_proto::{
//! new_connection,
//! sys::{SocketAddr, protocols::NETLINK_AUDIT},
//! sys::{protocols::NETLINK_AUDIT, SocketAddr},
//! };
//!
//! const AUDIT_STATUS_ENABLED: u32 = 1;
Expand Down Expand Up @@ -107,12 +111,17 @@
//! use futures::StreamExt;
//!
//! use netlink_packet_route::{
//! NLM_F_DUMP, NLM_F_REQUEST, NetlinkMessage, NetlinkHeader, LinkMessage, RtnlMessage
//! LinkMessage,
//! NetlinkHeader,
//! NetlinkMessage,
//! RtnlMessage,
//! NLM_F_DUMP,
//! NLM_F_REQUEST,
//! };
//!
//! use netlink_proto::{
//! new_connection,
//! sys::{SocketAddr, protocols::NETLINK_ROUTE},
//! sys::{protocols::NETLINK_ROUTE, SocketAddr},
//! };
//!
//! #[tokio::main]
Expand Down
4 changes: 2 additions & 2 deletions netlink-proto/src/protocol/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
mod protocol;
mod request;

pub use protocol::{Protocol, Response};
pub use request::Request;
pub(crate) use protocol::{Protocol, Response};
pub(crate) use request::Request;
4 changes: 2 additions & 2 deletions netlink-proto/src/protocol/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl RequestId {
}

#[derive(Debug, Eq, PartialEq)]
pub struct Response<T, M>
pub(crate) struct Response<T, M>
where
T: Debug + Clone + PartialEq + Eq + NetlinkSerializable<T> + NetlinkDeserializable<T>,
M: Debug,
Expand All @@ -47,7 +47,7 @@ struct PendingRequest<M> {
}

#[derive(Debug, Default)]
pub struct Protocol<T, M>
pub(crate) struct Protocol<T, M>
where
T: Debug + Clone + PartialEq + Eq + NetlinkSerializable<T> + NetlinkDeserializable<T>,
M: Debug,
Expand Down
2 changes: 1 addition & 1 deletion netlink-proto/src/protocol/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use netlink_packet_core::NetlinkMessage;
use crate::sys::SocketAddr;

#[derive(Debug)]
pub struct Request<T, M>
pub(crate) struct Request<T, M>
where
T: Debug + Clone + Eq + PartialEq,
M: Debug,
Expand Down