diff --git a/src/notification/event.rs b/src/notification/event.rs index 88fea758..100db878 100644 --- a/src/notification/event.rs +++ b/src/notification/event.rs @@ -70,7 +70,7 @@ pub struct EventMeta { } /// An listener for [`DataEvent`](crate::notification::DataEvent)s. Implementations can -/// be passed to [`Server::notify_data`](crate::Server::notify_data) +/// be passed to [`ServerBuilder::notify_data`](crate::ServerBuilder::notify_data) /// in order to receive notifications. #[async_trait] pub trait DataListener: Sync + Send + Debug { @@ -79,8 +79,8 @@ pub trait DataListener: Sync + Send + Debug { async fn receive_data_event(&self, e: DataEvent, m: EventMeta); } -/// An listener for [`PresenceEvent`](crate::notification::PresenceEvent)s. Implementations can -/// be passed to [`Server::notify_presence`](crate::Server::notify_presence) +/// A listener for [`PresenceEvent`](crate::notification::PresenceEvent)s. Implementations can +/// be passed to [`ServerBuilder::notify_presence`](crate::ServerBuilder::notify_presence) /// in order to receive notifications. #[async_trait] pub trait PresenceListener: Sync + Send + Debug { diff --git a/src/notification/mod.rs b/src/notification/mod.rs index 75182c27..339fbf50 100644 --- a/src/notification/mod.rs +++ b/src/notification/mod.rs @@ -3,11 +3,11 @@ //! Allows users to listen to events emitted by libunftp. //! //! To listen for changes in data implement the [`DataListener`](crate::notification::DataListener) -//! trait and use the [`Server::notify_data`](crate::Server::notify_data) method +//! trait and use the [`ServerBuilder::notify_data`](crate::ServerBuilder::notify_data) method //! to make libunftp notify it. //! //! To listen to logins and logouts implement the [`PresenceListener`](crate::notification::PresenceListener) -//! trait and use the [`Server::notify_presence`](crate::Server::notify_data) method +//! trait and use the [`ServerBuilder::notify_presence`](crate::ServerBuilder::notify_data) method //! to make libunftp use it. //! diff --git a/src/server/ftpserver.rs b/src/server/ftpserver.rs index 5f653b37..919e746f 100644 --- a/src/server/ftpserver.rs +++ b/src/server/ftpserver.rs @@ -482,7 +482,7 @@ where /// /// Preallocate a socket suitable for servicing the PASV command as received from the given IP /// address. This method is completely optional, but it is necessary in order to use the - /// [`service`] method when the server is running in capability mode. + /// [`Server::service`] method when the server is running in capability mode. // In the future, this could be extended to accept multiple invocations, allocating a // collection of sockets. pub async fn pasv_listener(self, addr: std::net::IpAddr) -> Self { diff --git a/src/server/ftpserver/options.rs b/src/server/ftpserver/options.rs index a541add3..7d0ecdbc 100644 --- a/src/server/ftpserver/options.rs +++ b/src/server/ftpserver/options.rs @@ -1,4 +1,4 @@ -//! Contains code pertaining to the setup options that can be given to the [`Server`](crate::Server) +//! Contains code pertaining to the setup options that can be given to the [`ServerBuilder`](crate::ServerBuilder) use bitflags::bitflags; use std::time::Duration; @@ -18,7 +18,7 @@ pub(crate) const DEFAULT_PASSIVE_PORTS: Range = 49152..65535; pub(crate) const DEFAULT_FTPS_REQUIRE: FtpsRequired = FtpsRequired::None; pub(crate) const DEFAULT_FTPS_TRUST_STORE: &str = "./trusted.pem"; -/// The option to [Server.passive_host](crate::Server::passive_host). It allows the user to specify how the IP address +/// The option to [ServerBuilder::passive_host](crate::ServerBuilder::passive_host). It allows the user to specify how the IP address /// communicated in the _PASV_ response is determined. #[derive(Debug, PartialEq, Clone, Default)] pub enum PassiveHost { @@ -57,7 +57,7 @@ impl From<&str> for PassiveHost { } } -/// The option to [Server.ftps_required](crate::Server::ftps_required). It allows the user to specify whether clients are required +/// The option to [ServerBuilder::ftps_required](crate::ServerBuilder::ftps_required). It allows the user to specify whether clients are required /// to upgrade a to secure TLS connection i.e. use FTPS. #[derive(Debug, PartialEq, Clone, Copy)] pub enum FtpsRequired { @@ -119,7 +119,7 @@ impl Default for TlsFlags { } } -/// The option to [Server.ftps_client_auth](crate::Server::ftps_client_auth). Tells if and how mutual TLS (client certificate +/// The option to [ServerBuilder::ftps_client_auth](crate::ServerBuilder::ftps_client_auth). Tells if and how mutual TLS (client certificate /// authentication) should be handled. #[derive(Debug, PartialEq, Clone, Copy, Default)] pub enum FtpsClientAuth { @@ -129,11 +129,11 @@ pub enum FtpsClientAuth { Off, /// Mutual TLS is on and whilst the server will request a certificate it will still proceed /// without one. If a certificate is sent by the client it will be validated against the - /// configured trust anchors (see [Server::ftps_trust_store](crate::Server::ftps_trust_store)). + /// configured trust anchors (see [ServerBuilder::ftps_trust_store](crate::ServerBuilder::ftps_trust_store)). Request, /// Mutual TLS is on, the server will request a certificate and it won't proceed without a /// client certificate that validates against the configured trust anchors (see - /// [Server::ftps_trust_store](crate::Server::ftps_trust_store)). + /// [ServerBuilder::ftps_trust_store](crate::ServerBuilder::ftps_trust_store)). Require, } @@ -148,7 +148,7 @@ impl From for FtpsClientAuth { } } -/// The options for [Server.sitemd5](crate::Server::sitemd5). +/// The options for [ServerBuilder::sitemd5](crate::ServerBuilder::sitemd5). /// Allow MD5 either to be used by all, logged in users only or no one. #[derive(Debug, PartialEq, Eq, Clone, Copy, Default)] pub enum SiteMd5 { @@ -162,7 +162,8 @@ pub enum SiteMd5 { } /// Tells how graceful shutdown should happen. An instance of this struct should be returned from -/// the future passed to [Server.shutdown_indicator](crate::Server::shutdown_indicator). +/// the future passed to +/// [ServerBuilder::shutdown_indicator](crate::ServerBuilder::shutdown_indicator). pub struct Shutdown { pub(crate) grace_period: Duration, //pub(crate) handle_new_connections: bool, @@ -242,8 +243,9 @@ impl Default for FailedLoginsPolicy { } } -/// The options for [Server.active_passive_mode](crate::Server::active_passive_mode). -/// This allows to switch active / passive mode on or off. +/// The options for +/// [ServerBuilder::active_passive_mode](crate::ServerBuilder::active_passive_mode). This allows +/// to switch active / passive mode on or off. #[derive(Debug, PartialEq, Eq, Clone, Copy, Default)] pub enum ActivePassiveMode { /// Only passive mode is enabled