Fix up doc links

This commit is contained in:
Jon Gjengset 2024-03-31 10:03:15 +02:00
parent 650844f2cd
commit 28faa816a9
7 changed files with 18 additions and 8 deletions

View file

@ -8,15 +8,16 @@ use std::ops::{Deref, DerefMut};
use std::str; use std::str;
use std::sync::mpsc; use std::sync::mpsc;
use crate::error::TagMismatch;
use super::authenticator::Authenticator; use super::authenticator::Authenticator;
use super::error::{Bad, Bye, Error, No, ParseError, Result, ValidateError}; use super::error::{Bad, Bye, Error, No, ParseError, Result, TagMismatch, ValidateError};
use super::extensions; use super::extensions;
use super::parse::*; use super::parse::*;
use super::types::*; use super::types::*;
use super::utils::*; use super::utils::*;
#[cfg(doc)]
use imap_proto::NameAttribute;
static TAG_PREFIX: &str = "a"; static TAG_PREFIX: &str = "a";
const INITIAL_TAG: u32 = 0; const INITIAL_TAG: u32 = 0;
const CR: u8 = 0x0d; const CR: u8 = 0x0d;

View file

@ -108,7 +108,8 @@ pub enum Error {
/// The server responded with a different command tag than the one we just sent. /// The server responded with a different command tag than the one we just sent.
/// ///
/// A new session must generally be established to recover from this. You can also use /// A new session must generally be established to recover from this. You can also use
/// [`Connection::skip_tag`] (which is available through both [`Client`] and [`Session`]). /// [`Connection::skip_tag`](crate::client::Connection::skip_tag) (which is available through
/// both [`Client`](crate::Client) and [`Session`](crate::Session)).
TagMismatch(TagMismatch), TagMismatch(TagMismatch),
/// StartTls is not available on the server /// StartTls is not available on the server
StartTlsNotAvailable, StartTlsNotAvailable,

View file

@ -13,6 +13,8 @@
//! imap = { version = "3.0", features = ["test_helpers"] } //! imap = { version = "3.0", features = ["test_helpers"] }
//! ``` //! ```
//! //!
#[cfg(doc)]
use crate::{extensions::list_status::ExtendedNames, types::*};
/// Methods to build a [`Capabilities`] response object /// Methods to build a [`Capabilities`] response object
pub mod capabilities { pub mod capabilities {

View file

@ -1,5 +1,8 @@
use imap_proto::UidSetMember; use imap_proto::UidSetMember;
#[cfg(doc)]
use crate::types::Uid;
/// Meta-information about a message, as returned by /// Meta-information about a message, as returned by
/// [`APPEND`](https://tools.ietf.org/html/rfc3501#section-6.3.11). /// [`APPEND`](https://tools.ietf.org/html/rfc3501#section-6.3.11).
/// Note that `APPEND` only returns any data if certain extensions are enabled, /// Note that `APPEND` only returns any data if certain extensions are enabled,

View file

@ -1,5 +1,8 @@
use std::borrow::Cow; use std::borrow::Cow;
#[cfg(doc)]
use crate::types::Mailbox;
/// With the exception of [`Flag::Custom`], these flags are system flags that are pre-defined in /// With the exception of [`Flag::Custom`], these flags are system flags that are pre-defined in
/// [RFC 3501 section 2.3.2](https://tools.ietf.org/html/rfc3501#section-2.3.2). All system flags /// [RFC 3501 section 2.3.2](https://tools.ietf.org/html/rfc3501#section-2.3.2). All system flags
/// begin with `\` in the IMAP protocol. Certain system flags (`\Deleted` and `\Seen`) have /// begin with `\` in the IMAP protocol. Certain system flags (`\Deleted` and `\Seen`) have

View file

@ -9,7 +9,7 @@ use std::sync::mpsc;
/// From [SETQUOTA Resource limit](https://datatracker.ietf.org/doc/html/rfc2087#section-4.1) /// From [SETQUOTA Resource limit](https://datatracker.ietf.org/doc/html/rfc2087#section-4.1)
/// ///
/// Used by [`Session::set_quota`] /// Used by [`Session::set_quota`](crate::Session::set_quota).
#[derive(Clone, Debug, Eq, PartialEq)] #[derive(Clone, Debug, Eq, PartialEq)]
#[non_exhaustive] #[non_exhaustive]
pub struct QuotaResourceLimit<'a> { pub struct QuotaResourceLimit<'a> {
@ -35,7 +35,7 @@ impl Display for QuotaResourceLimit<'_> {
/// From [Resources](https://datatracker.ietf.org/doc/html/rfc2087#section-3) /// From [Resources](https://datatracker.ietf.org/doc/html/rfc2087#section-3)
/// ///
/// Used by [`QuotaLimit`], and [`QuotaResource`] /// Used by [`QuotaResourceLimit`], and [`QuotaResource`]
#[derive(Debug, Eq, PartialEq, Clone)] #[derive(Debug, Eq, PartialEq, Clone)]
#[non_exhaustive] #[non_exhaustive]
pub enum QuotaResourceName<'a> { pub enum QuotaResourceName<'a> {
@ -128,7 +128,7 @@ impl QuotaResponse {
/// From [QUOTA Response](https://datatracker.ietf.org/doc/html/rfc2087#section-5.1) /// From [QUOTA Response](https://datatracker.ietf.org/doc/html/rfc2087#section-5.1)
/// ///
/// Used by [`QuotaResponse`] and [`QuotaRoot`] /// Used by [`QuotaResponse`] and [`QuotaRootResponse`]
#[derive(Debug, Eq, PartialEq)] #[derive(Debug, Eq, PartialEq)]
#[non_exhaustive] #[non_exhaustive]
pub struct Quota<'a> { pub struct Quota<'a> {

View file

@ -75,7 +75,7 @@ pub enum UnsolicitedResponse {
// TODO: the spec doesn't seem to say anything about when these may be received as unsolicited? // TODO: the spec doesn't seem to say anything about when these may be received as unsolicited?
Flags(Vec<Flag<'static>>), Flags(Vec<Flag<'static>>),
/// An unsolicited METADATA response (https://tools.ietf.org/html/rfc5464#section-4.4.2) /// An unsolicited [METADATA response](https://tools.ietf.org/html/rfc5464#section-4.4.2)
/// that reports a change in a server or mailbox annotation. /// that reports a change in a server or mailbox annotation.
Metadata { Metadata {
/// Mailbox name for which annotations were changed. /// Mailbox name for which annotations were changed.