Skip to content

Commit 9027047

Browse files
committed
Documentation fixes
1 parent 726b9e1 commit 9027047

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -733,8 +733,8 @@ impl<T: Read + Write + Unpin + fmt::Debug + Send> Session<T> {
733733
/// either does not have [`Flag::Deleted`] set or has a [`Uid`] that is not included in the
734734
/// specified sequence set, it is not affected.
735735
///
736-
/// This command is particularly useful for disconnected use clients. By using [`uid_expunge`]
737-
/// instead of [`expunge`] when resynchronizing with the server, the client can ensure that it
736+
/// This command is particularly useful for disconnected use clients. By using `uid_expunge`
737+
/// instead of [`Self::expunge`] when resynchronizing with the server, the client can ensure that it
738738
/// does not inadvertantly remove any messages that have been marked as [`Flag::Deleted`] by
739739
/// other clients between the time that the client was last connected and the time the client
740740
/// resynchronizes.

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88
//! challenge/response authentication respectively. This in turn gives you an authenticated
99
//! [`Session`], which lets you access the mailboxes at the server.
1010
//!
11-
//! The documentation within this crate borrows heavily from the various RFCs, but should not be
12-
//! considered a complete reference. If anything is unclear, follow the links to the RFCs embedded
13-
//! in the documentation for the various types and methods and read the raw text there!
11+
//! The documentation within this crate borrows heavily from the various RFCs,
12+
//! but should not be considered a complete reference.
13+
//! If anything is unclear,
14+
//! follow the links to the RFCs embedded in the documentation
15+
//! for the various types and methods and read the raw text there!
1416
//!
1517
//! Below is a basic client example. See the `examples/` directory for more.
1618
//!

src/types/capabilities.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl From<&CapabilityRef<'_>> for Capability {
4040
/// authentication mechanism.
4141
///
4242
/// The `LOGINDISABLED` capability indicates that the `LOGIN` command is disabled, and that the
43-
/// server will respond with a [`super::Error::No`] response to any attempt to use the `LOGIN`
43+
/// server will respond with a [`crate::error::Error::No`] response to any attempt to use the `LOGIN`
4444
/// command even if the user name and password are valid. An IMAP client MUST NOT issue the
4545
/// `LOGIN` command if the server advertises the `LOGINDISABLED` capability.
4646
///

src/types/id_generator.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
use imap_proto::RequestId;
22

3+
/// Request ID generator.
34
#[derive(Debug)]
45
pub struct IdGenerator {
6+
/// Last returned ID.
57
next: u64,
68
}
79

810
impl IdGenerator {
11+
/// Creates a new request ID generator.
912
pub fn new() -> Self {
1013
Self { next: 0 }
1114
}

src/types/quota.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use imap_proto::types::QuotaResource as QuotaResourceRef;
33
use imap_proto::types::QuotaResourceName as QuotaResourceNameRef;
44
use imap_proto::types::QuotaRoot as QuotaRootRef;
55

6-
/// https://tools.ietf.org/html/rfc2087#section-3
6+
/// <https://tools.ietf.org/html/rfc2087#section-3>
77
#[derive(Debug, Eq, PartialEq, Hash, Clone)]
88
pub enum QuotaResourceName {
99
/// Sum of messages' RFC822.SIZE, in units of 1024 octets
@@ -24,7 +24,7 @@ impl<'a> From<QuotaResourceNameRef<'a>> for QuotaResourceName {
2424
}
2525
}
2626

27-
/// 5.1. QUOTA Response (https://tools.ietf.org/html/rfc2087#section-5.1)
27+
/// 5.1. QUOTA Response (<https://tools.ietf.org/html/rfc2087#section-5.1>)
2828
#[derive(Debug, Eq, PartialEq, Hash, Clone)]
2929
pub struct QuotaResource {
3030
/// name of the resource
@@ -46,13 +46,13 @@ impl<'a> From<QuotaResourceRef<'a>> for QuotaResource {
4646
}
4747

4848
impl QuotaResource {
49-
/// gets the usage percentage of a QuotaResource
49+
/// Returns the usage percentage of a QuotaResource.
5050
pub fn get_usage_percentage(&self) -> u64 {
5151
self.usage.saturating_mul(100) / self.limit
5252
}
5353
}
5454

55-
/// 5.1. QUOTA Response (https://tools.ietf.org/html/rfc2087#section-5.1)
55+
/// 5.1. QUOTA Response (<https://tools.ietf.org/html/rfc2087#section-5.1>)
5656
#[derive(Debug, Eq, PartialEq, Hash, Clone)]
5757
pub struct Quota {
5858
/// quota root name
@@ -70,7 +70,7 @@ impl<'a> From<QuotaRef<'a>> for Quota {
7070
}
7171
}
7272

73-
/// 5.2. QUOTAROOT Response (https://tools.ietf.org/html/rfc2087#section-5.2)
73+
/// 5.2. QUOTAROOT Response (<https://tools.ietf.org/html/rfc2087#section-5.2>)
7474
#[derive(Debug, Eq, PartialEq, Hash, Clone)]
7575
pub struct QuotaRoot {
7676
/// mailbox name

0 commit comments

Comments
 (0)