diff --git a/Sources/NIOIMAPCore/ByteBuffer+WriteLiteral.swift b/Sources/NIOIMAPCore/ByteBuffer+WriteLiteral.swift index 798147f3..4b8b9d08 100644 --- a/Sources/NIOIMAPCore/ByteBuffer+WriteLiteral.swift +++ b/Sources/NIOIMAPCore/ByteBuffer+WriteLiteral.swift @@ -152,7 +152,7 @@ extension EncodeBuffer { } /// Writes a collection of bytes in the `literal8` syntax defined in RFC 3516. - /// This function allows the `null` byte `\0` to be written. + /// Allows the `null` byte `\0` to be written. /// - parameters: /// - bytes: The raw bytes to write to `self`. /// - returns: The number of bytes written. diff --git a/Sources/NIOIMAPCore/CommandEncodeBuffer.swift b/Sources/NIOIMAPCore/CommandEncodeBuffer.swift index 484eee77..42d38732 100644 --- a/Sources/NIOIMAPCore/CommandEncodeBuffer.swift +++ b/Sources/NIOIMAPCore/CommandEncodeBuffer.swift @@ -36,7 +36,7 @@ import struct NIO.ByteBuffer public struct CommandEncodeBuffer: Hashable, Sendable { /// The underlying buffer containing data to be written. /// - /// This provides access to the raw ``EncodeBuffer`` for advanced operations, + /// Provides access to the raw ``EncodeBuffer`` for advanced operations, /// though most users should interact through the public API of `CommandEncodeBuffer`. @_spi(NIOIMAPInternal) public var buffer: EncodeBuffer @@ -68,7 +68,7 @@ public struct CommandEncodeBuffer: Hashable, Sendable { extension CommandEncodeBuffer { /// The encoding options currently in use. /// - /// These options determine how protocol elements are encoded (e.g., whether to use + /// These options determine how protocol elements are encoded (for example, whether to use /// quoted strings, which literal formats are supported). You can modify these /// options at runtime to change encoding behavior for subsequent write operations. /// @@ -88,7 +88,7 @@ extension CommandEncodeBuffer { /// Creates a new command encoding buffer from server capabilities. /// - /// This initializer converts a list of ``Capability`` values into ``CommandEncodingOptions``, + /// Converts a list of ``Capability`` values into ``CommandEncodingOptions``, /// which automatically enables extended literal formats and binary support if the /// server advertises the corresponding capabilities. /// diff --git a/Sources/NIOIMAPCore/CommandEncodingOptions.swift b/Sources/NIOIMAPCore/CommandEncodingOptions.swift index 9161ef85..b08f0805 100644 --- a/Sources/NIOIMAPCore/CommandEncodingOptions.swift +++ b/Sources/NIOIMAPCore/CommandEncodingOptions.swift @@ -53,7 +53,7 @@ public struct CommandEncodingOptions: Hashable, Sendable { /// Use the RFC 3501 synchronizing literal format (`{20}\r\n`). /// - /// This is the standard literal format that requires the server to send a `+` + /// The standard literal format that requires the server to send a `+` /// continuation request before the client sends the literal data. Set to `true` /// for RFC 3501-compliant encoding. /// @@ -82,7 +82,7 @@ public struct CommandEncodingOptions: Hashable, Sendable { /// Use binary content literals (`~{20}\r\n`). /// - /// This format is defined in RFC 3516 and allows sending arbitrary binary data. + /// Defined in RFC 3516, this format allows sending arbitrary binary data. /// Note that binary literals can only be used in certain contexts, such as the /// `APPEND` command with the `BINARY` extension. /// @@ -142,7 +142,7 @@ public struct CommandEncodingOptions: Hashable, Sendable { extension CommandEncodingOptions { /// Creates encoding options by inspecting server capabilities. /// - /// This initializer automatically enables extended literal formats based on + /// Automatically enables extended literal formats based on /// server capabilities, making it easy to use the best available encoding strategy. /// /// The initialization process: diff --git a/Sources/NIOIMAPCore/EncodeBuffer.swift b/Sources/NIOIMAPCore/EncodeBuffer.swift index 66d30867..22407d19 100644 --- a/Sources/NIOIMAPCore/EncodeBuffer.swift +++ b/Sources/NIOIMAPCore/EncodeBuffer.swift @@ -22,7 +22,7 @@ import struct NIO.CircularBuffer /// that can be transmitted over the network. It wraps a `ByteBuffer` and tracks /// encoding state, supporting both client commands and server responses. /// -/// This type is part of the internal SPI and is primarily used by: +/// Part of the internal SPI and is primarily used by: /// - ``CommandEncodeBuffer`` for encoding client commands /// - ``ResponseEncodeBuffer`` for encoding server responses /// @@ -43,7 +43,7 @@ import struct NIO.CircularBuffer @_spi(NIOIMAPInternal) public struct EncodeBuffer: Hashable, Sendable { /// Determines whether the buffer encodes for a client or server. /// - /// This affects how the buffer formats protocol elements like literals, strings, + /// Affects how the buffer formats protocol elements like literals, strings, /// and response codes. The mode also carries encoding options specific to each role. public enum Mode: Hashable, Sendable { /// Encodes client commands using the specified options. @@ -67,7 +67,7 @@ import struct NIO.CircularBuffer /// /// When `true`, methods like ``writeBytes(_:)`` and ``writeBuffer(_:)`` will /// write placeholder text like `[N bytes]` instead of the actual binary content. - /// This is useful for logging and debugging without exposing sensitive data. + /// Useful for logging and debugging without exposing sensitive data. public var loggingMode: Bool internal var mode: Mode @@ -159,7 +159,7 @@ extension EncodeBuffer { public struct Chunk: Hashable, Sendable { /// The encoded bytes ready to write to the network. /// - /// This buffer contains the next portion of IMAP protocol data to transmit. + /// Contains the next portion of IMAP protocol data to transmit. public var bytes: ByteBuffer /// Whether a continuation request (`+`) should be expected before sending the next chunk. diff --git a/Sources/NIOIMAPCore/Grammar/AbsoluteMessagePath.swift b/Sources/NIOIMAPCore/Grammar/AbsoluteMessagePath.swift index b7869a2d..40ba1b2f 100644 --- a/Sources/NIOIMAPCore/Grammar/AbsoluteMessagePath.swift +++ b/Sources/NIOIMAPCore/Grammar/AbsoluteMessagePath.swift @@ -40,7 +40,7 @@ /// Result: imap://user@example.com/INBOX/;uid=20 /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``RelativeIMAPURL`` uses absolute message paths as one variant of relative URLs /// - ``URLCommand`` specifies the fetch operation details diff --git a/Sources/NIOIMAPCore/Grammar/Access.swift b/Sources/NIOIMAPCore/Grammar/Access.swift index b1a2150d..e638c31b 100644 --- a/Sources/NIOIMAPCore/Grammar/Access.swift +++ b/Sources/NIOIMAPCore/Grammar/Access.swift @@ -20,7 +20,7 @@ import struct NIO.ByteBuffer /// It restricts which users or sessions are permitted to access the message data referenced by the URL. /// Each ``AuthenticatedURLRump`` includes an access identifier that determines authorization policy. /// -/// ### Access Types +/// ### Access types /// /// - ``anonymous``: Any user, including non-authenticated sessions, may access the URL /// - ``authenticateUser``: Only authenticated (non-anonymous) sessions may access the URL @@ -46,7 +46,7 @@ import struct NIO.ByteBuffer /// /// Only sessions authenticated as "fred" may use this URL. /// -/// ## Related Types +/// ## Related types /// /// See ``AuthenticatedURLRump`` for how access identifiers are combined with expiration dates, /// ``AuthenticatedURLVerifier`` for the verification token, and ``AuthenticatedURL`` for diff --git a/Sources/NIOIMAPCore/Grammar/Append/AppendData.swift b/Sources/NIOIMAPCore/Grammar/Append/AppendData.swift index 3b1d3f4d..3bd3fdf0 100644 --- a/Sources/NIOIMAPCore/Grammar/Append/AppendData.swift +++ b/Sources/NIOIMAPCore/Grammar/Append/AppendData.swift @@ -61,7 +61,7 @@ public struct AppendData: Hashable, Sendable { /// not MIME content-transfer-encoded. /// /// When `false` (default), the data is sent using standard literal syntax `{size}`, - /// indicating the bytes are MIME content-transfer-encoded (e.g., base64 for binary content). + /// indicating the bytes are MIME content-transfer-encoded (for example, base64 for binary content). /// /// **Requires server capability:** ``Capability/binary`` (when `true`) /// diff --git a/Sources/NIOIMAPCore/Grammar/AttributeFlag.swift b/Sources/NIOIMAPCore/Grammar/AttributeFlag.swift index e85fb5ea..ec3e3e24 100644 --- a/Sources/NIOIMAPCore/Grammar/AttributeFlag.swift +++ b/Sources/NIOIMAPCore/Grammar/AttributeFlag.swift @@ -25,7 +25,7 @@ import struct NIO.ByteBuffer /// Attribute flags are case-insensitive for comparison but preserve their original casing when transmitted. /// They are normalized to lowercase for comparison. /// -/// ### Standard Attribute Flags +/// ### Standard attribute flags /// /// - ``answered`` - The message has been replied to. /// - ``flagged`` - The message has been marked for attention. @@ -69,7 +69,7 @@ public struct AttributeFlag: Hashable, Sendable { /// The provided string is automatically lowercased to normalize the flag value, allowing case-insensitive /// comparison while preserving the original casing for transmission. /// - /// - parameter stringValue: The flag string (e.g., `"\\Answered"`, `"\\SEEN"`). Will be lowercased. + /// - parameter stringValue: The flag string (for example, `"\\Answered"` or `"\\SEEN"`). Will be lowercased. public init(_ stringValue: String) { self.stringValue = stringValue.lowercased() } diff --git a/Sources/NIOIMAPCore/Grammar/AuthenticatedURL.swift b/Sources/NIOIMAPCore/Grammar/AuthenticatedURL.swift index b27bc6f3..feb49e93 100644 --- a/Sources/NIOIMAPCore/Grammar/AuthenticatedURL.swift +++ b/Sources/NIOIMAPCore/Grammar/AuthenticatedURL.swift @@ -18,7 +18,7 @@ /// IMAP URL. It pairs the authorization parameters (expiration and access) with the verification /// information (mechanism and token). /// -/// This type represents the `;URLAUTH=::` component appended to IMAP URLs +/// The `;URLAUTH=::` component is appended to IMAP URLs /// according to RFC 4467. It is used when: /// /// 1. **Generating URLAUTH URLs** (GENURLAUTH command): Server creates authorization information @@ -63,7 +63,7 @@ /// S: a002 OK URLFETCH completed /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``AuthenticatedURLRump`` provides expiration and access information /// - ``AuthenticatedURLVerifier`` provides mechanism and token for verification diff --git a/Sources/NIOIMAPCore/Grammar/AuthenticatedURLRump.swift b/Sources/NIOIMAPCore/Grammar/AuthenticatedURLRump.swift index b9a04ca3..5cf363a9 100644 --- a/Sources/NIOIMAPCore/Grammar/AuthenticatedURLRump.swift +++ b/Sources/NIOIMAPCore/Grammar/AuthenticatedURLRump.swift @@ -22,7 +22,7 @@ /// Together, ``AuthenticatedURLRump`` and ``AuthenticatedURLVerifier`` form a complete /// ``AuthenticatedURL`` that defines all authorization parameters for a URLAUTH-authorized URL. /// -/// ### URLAUTH Format +/// ### URLAUTH format /// /// A complete URLAUTH component has the form: /// ``` @@ -58,7 +58,7 @@ /// imap://owner@example.com/INBOX/;uid=20;EXPIRE=2025-12-31T23:59:59Z;URLAUTH=anonymous:internal:TOKEN /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``Expire`` wraps the optional expiration date /// - ``Access`` defines the access identifier diff --git a/Sources/NIOIMAPCore/Grammar/AuthenticatedURLVerifier.swift b/Sources/NIOIMAPCore/Grammar/AuthenticatedURLVerifier.swift index b8b1e276..55697eda 100644 --- a/Sources/NIOIMAPCore/Grammar/AuthenticatedURLVerifier.swift +++ b/Sources/NIOIMAPCore/Grammar/AuthenticatedURLVerifier.swift @@ -22,7 +22,7 @@ /// The verifier allows the IMAP server to validate that the URL has been properly authorized /// by verifying the token using the specified mechanism and a stored mailbox access key. /// -/// ### Verification Process (RFC 4467 Section 6) +/// ### Verification process (RFC 4467 Section 6) /// /// When a URLFETCH command is issued with a URLAUTH-authorized URL: /// @@ -49,7 +49,7 @@ /// S: * URLFETCH ("imap://user@example.com/INBOX/;uid=20;urlauth=anonymous:internal:91354a473744909de610943775f92038" "message-data") /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``URLAuthenticationMechanism`` specifies the token generation algorithm /// - ``EncodedAuthenticatedURL`` wraps the hexadecimal-encoded token diff --git a/Sources/NIOIMAPCore/Grammar/AuthenticationMechanism.swift b/Sources/NIOIMAPCore/Grammar/AuthenticationMechanism.swift index 78be6ef6..8d2846ec 100644 --- a/Sources/NIOIMAPCore/Grammar/AuthenticationMechanism.swift +++ b/Sources/NIOIMAPCore/Grammar/AuthenticationMechanism.swift @@ -60,7 +60,7 @@ public struct AuthenticationMechanism: Hashable, Sendable { /// /// The provided value is uppercased for consistency with IMAP protocol conventions. /// - /// - parameter value: The mechanism name (e.g., PLAIN, GSSAPI). + /// - parameter value: The mechanism name (for example, PLAIN or GSSAPI). public init(_ value: String) { self.rawValue = value.uppercased() } diff --git a/Sources/NIOIMAPCore/Grammar/Body/Body.swift b/Sources/NIOIMAPCore/Grammar/Body/Body.swift index 03007fc0..f41de47e 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Body.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Body.swift @@ -51,7 +51,7 @@ extension MessageAttribute { /// S: A001 OK FETCH completed /// ``` /// -/// This represents a ``singlepart(_:)`` case containing a ``Singlepart`` with media type `text/plain`. +/// The response is a ``singlepart(_:)`` case containing a ``Singlepart`` with media type `text/plain`. /// /// **Multipart message:** /// ``` @@ -60,7 +60,7 @@ extension MessageAttribute { /// S: A002 OK FETCH completed /// ``` /// -/// This represents a ``multipart(_:)`` case containing two parts (text/plain and text/html) with media subtype `alternative`. +/// The response is a ``multipart(_:)`` case containing two parts (text/plain and text/html) with media subtype `alternative`. /// /// - SeeAlso: [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2) /// - SeeAlso: [RFC 3501 Section 2.6.3](https://datatracker.ietf.org/doc/html/rfc3501#section-2.6.3) @@ -74,7 +74,7 @@ public enum BodyStructure: Hashable, Sendable { /// A multipart message body containing one or more sub-parts. /// - /// Multipart messages have multiple MIME parts (e.g., `multipart/mixed` for mixed content, + /// Multipart messages have multiple MIME parts (such as `multipart/mixed` for mixed content or /// `multipart/alternative` for alternative representations). case multipart(Multipart) } @@ -101,7 +101,7 @@ extension BodyStructure: RandomAccessCollection { /// Gets the body at the given `position`. /// - /// This will assert if `position` is not a valid part of this ``BodyStructure``. + /// Crashes if `position` is not a valid part of this ``BodyStructure``. /// /// - parameter position: The position of the desired body. /// - returns: The body located at the given `position`. diff --git a/Sources/NIOIMAPCore/Grammar/Body/Field/Disposition.swift b/Sources/NIOIMAPCore/Grammar/Body/Field/Disposition.swift index 192e3c95..c9dd1c10 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Field/Disposition.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Field/Disposition.swift @@ -26,8 +26,7 @@ extension BodyStructure { public struct DispositionKind: Hashable, RawRepresentable, Sendable { /// The `inline` disposition, indicating the part should be displayed as part of the message body. /// - /// This is the default disposition when not specified. Inline parts are typically displayed automatically - /// by mail clients as part of the message preview. + /// The default disposition when not specified. public static let inline = Self(rawValue: "inline") /// The `attachment` disposition, indicating the part should be treated as a downloadable attachment. @@ -43,7 +42,7 @@ extension BodyStructure { /// The provided string is automatically lowercased to normalize the disposition value, allowing /// case-insensitive comparison. /// - /// - parameter rawValue: The disposition kind (e.g., `"inline"`, `"attachment"`). Will be lowercased. + /// - parameter rawValue: The disposition kind (for example, `"inline"` or `"attachment"`). Will be lowercased. public init(rawValue: String) { self.rawValue = rawValue.lowercased() } @@ -74,7 +73,7 @@ extension BodyStructure { /// - SeeAlso: [RFC 2183](https://datatracker.ietf.org/doc/html/rfc2183) /// - SeeAlso: [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2) public struct Disposition: Hashable, Sendable { - /// The disposition kind (e.g., `inline` or `attachment`). + /// The disposition kind, such as `inline` or `attachment`. public var kind: DispositionKind /// Optional parameters associated with the disposition. @@ -86,7 +85,7 @@ extension BodyStructure { /// Creates a new disposition. /// /// - parameter kind: The disposition kind (`inline` or `attachment`). - /// - parameter parameters: An ordered dictionary of disposition parameters (e.g., filename, size). + /// - parameter parameters: An ordered dictionary of disposition parameters (for example, filename and size). public init(kind: DispositionKind, parameters: OrderedDictionary) { self.kind = kind self.parameters = parameters @@ -112,7 +111,6 @@ extension BodyStructure { /// The `filename` parameter value, if present. /// /// The `filename` parameter provides a recommended filename for saving the message part to disk. - /// This is commonly used for attachment parts. /// /// - Returns: The filename string, or `nil` if the parameter is not present. public var filename: String? { diff --git a/Sources/NIOIMAPCore/Grammar/Body/Field/DispositionAndLanguage.swift b/Sources/NIOIMAPCore/Grammar/Body/Field/DispositionAndLanguage.swift index dcc2a80d..5052b1dd 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Field/DispositionAndLanguage.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Field/DispositionAndLanguage.swift @@ -17,12 +17,10 @@ import struct NIO.ByteBuffer extension BodyStructure { /// Content disposition and language information for a message part. /// - /// This type pairs optional content disposition (indicating how the part should be handled) with optional + /// Pairs optional content disposition (indicating how the part should be handled) with optional /// language and location information. Both are optional fields in the body structure defined in /// [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2). /// - /// This is an API abstraction to simplify working with the disposition and language/location pairing from the raw IMAP message. - /// /// ### Example /// /// ``` diff --git a/Sources/NIOIMAPCore/Grammar/Body/Field/Encoding.swift b/Sources/NIOIMAPCore/Grammar/Body/Field/Encoding.swift index 19dc5ae5..3ea4b1e1 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Field/Encoding.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Field/Encoding.swift @@ -69,7 +69,7 @@ extension BodyStructure { /// The encoding as an uppercase string. /// - /// - Returns: The encoding name in uppercase (e.g., `"7BIT"`, `"BASE64"`, `"QUOTED-PRINTABLE"`). + /// - Returns: The encoding name in uppercase, for example `"7BIT"`, `"BASE64"`, or `"QUOTED-PRINTABLE"`. public var debugDescription: String { stringValue } /// Creates a new encoding from a string representation. @@ -77,7 +77,7 @@ extension BodyStructure { /// The provided string is automatically uppercased to normalize the encoding value. This allows /// case-insensitive comparison between encoding values. /// - /// - parameter stringValue: The encoding name as a string (e.g., `"7bit"`, `"base64"`). Will be uppercased. + /// - parameter stringValue: The encoding name as a string (for example, `"7bit"` or `"base64"`). Will be uppercased. public init(_ stringValue: String) { self.stringValue = stringValue.uppercased() } diff --git a/Sources/NIOIMAPCore/Grammar/Body/Field/Fields.swift b/Sources/NIOIMAPCore/Grammar/Body/Field/Fields.swift index 99d60023..0f6d3049 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Field/Fields.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Field/Fields.swift @@ -23,7 +23,7 @@ extension BodyStructure { /// transfer encoding, and octet count. /// /// These fields are derived from MIME headers (`Content-Type`, `Content-Transfer-Encoding`, - /// etc.) and are essential for understanding how to process each message part. + /// and so on) and are essential for understanding how to process each message part. /// /// ### Example /// @@ -58,7 +58,7 @@ extension BodyStructure { /// The content transfer encoding from the `Content-Transfer-Encoding` header. /// - /// Describes how the message part is encoded (e.g., `7bit`, `base64`, `quoted-printable`). + /// Describes how the message part is encoded (for example, `7bit`, `base64`, or `quoted-printable`). public var encoding: Encoding? /// The size of the body part in octets (bytes). diff --git a/Sources/NIOIMAPCore/Grammar/Body/Field/LanguageLocation.swift b/Sources/NIOIMAPCore/Grammar/Body/Field/LanguageLocation.swift index 80e940cf..2d2f06bb 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Field/LanguageLocation.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Field/LanguageLocation.swift @@ -17,13 +17,11 @@ import struct NIO.ByteBuffer extension BodyStructure { /// Language and content location information for a message part. /// - /// This type pairs one or more language identifiers with an optional content location URI. The language values + /// Pairs one or more language identifiers with an optional content location URI. The language values /// follow [BCP 47](https://datatracker.ietf.org/doc/html/bcp47) language tags and the location follows /// [RFC 2557](https://datatracker.ietf.org/doc/html/rfc2557) for MIME content location URIs. Both are optional /// fields in the body structure defined in [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2). /// - /// This is an API abstraction to simplify working with the language/location pairing from the raw IMAP message. - /// /// ### Example /// /// ``` @@ -42,7 +40,7 @@ extension BodyStructure { /// One or more language identifiers for the message part. /// /// Language values follow [BCP 47](https://datatracker.ietf.org/doc/html/bcp47) language tag format - /// (e.g., `"en"` for English, `"en-US"` for US English, `"fr"` for French). + /// (for example, `"en"` for English, `"en-US"` for US English, or `"fr"` for French). public var languages: [String] /// Optional content location URI for the message part. diff --git a/Sources/NIOIMAPCore/Grammar/Body/Field/LocationAndExtensions.swift b/Sources/NIOIMAPCore/Grammar/Body/Field/LocationAndExtensions.swift index 6a250383..499bcc18 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Field/LocationAndExtensions.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Field/LocationAndExtensions.swift @@ -17,15 +17,13 @@ import struct NIO.ByteBuffer extension BodyStructure { /// Content location URI and future extension fields for a message part. /// - /// This type pairs a content location URI (defined in [RFC 2557](https://datatracker.ietf.org/doc/html/rfc2557)) + /// Pairs a content location URI (defined in [RFC 2557](https://datatracker.ietf.org/doc/html/rfc2557)) /// with a list of future extension fields. The location provides a URI where the message part content can be /// retrieved, and extensions allow servers to add new fields without breaking existing clients. /// /// Both the location and extensions are optional fields in the body structure defined in /// [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2). /// - /// This is an API abstraction to simplify working with the location/extension pairing from the raw IMAP message. - /// /// ### Example /// /// ``` diff --git a/Sources/NIOIMAPCore/Grammar/Body/Multipart.swift b/Sources/NIOIMAPCore/Grammar/Body/Multipart.swift index 0a21adcf..f77cee35 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Multipart.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Multipart.swift @@ -20,8 +20,8 @@ extension BodyStructure { /// /// A multipart body represents a message divided into multiple MIME parts. Common multipart types include: /// - `multipart/mixed`: Parts with different media types mixed together - /// - `multipart/alternative`: Alternative representations of the same content (e.g., plain text and HTML) - /// - `multipart/related`: Parts that reference each other (e.g., HTML with embedded images) + /// - `multipart/alternative`: Alternative representations of the same content (such as plain text and HTML) + /// - `multipart/related`: Parts that reference each other (such as HTML with embedded images) /// /// Each part in a multipart body is itself a ``BodyStructure``, which may be another multipart, creating /// arbitrarily deep nesting. Optional extension fields provide forward compatibility with future extensions. @@ -32,7 +32,7 @@ extension BodyStructure { /// (("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 1234 20) ("text" "html" ("charset" "us-ascii") NIL NIL "7bit" 5678 45) "alternative") /// ``` /// - /// This is parsed as a ``Multipart`` with two parts (text/plain and text/html) and media subtype `alternative`. + /// The wire format above is parsed as a ``Multipart`` with two parts (text/plain and text/html) and media subtype `alternative`. /// /// - SeeAlso: [RFC 3501 Section 6.4.5](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.5) /// - SeeAlso: [RFC 2045](https://datatracker.ietf.org/doc/html/rfc2045) @@ -43,7 +43,7 @@ extension BodyStructure { /// Parts may be accessed using ``SectionSpecifier/Part`` indices. public var parts: [BodyStructure] - /// The multipart subtype (e.g., `mixed` for `multipart/mixed`, `alternative` for `multipart/alternative`). + /// The multipart subtype (for example, `mixed` for `multipart/mixed` or `alternative` for `multipart/alternative`). /// /// The subtype indicates how the parts should be interpreted or presented. public var mediaSubtype: Media.Subtype @@ -56,7 +56,7 @@ extension BodyStructure { /// Creates a new multipart body. /// - parameter parts: The MIME parts that comprise this multipart - /// - parameter mediaSubtype: The multipart subtype (e.g., `mixed`, `alternative`) + /// - parameter mediaSubtype: The multipart subtype (for example, `mixed` or `alternative`) /// - parameter extension: Optional extension fields (defaults to `nil`) public init(parts: [BodyStructure], mediaSubtype: Media.Subtype, extension: Extension? = nil) { self.parts = parts @@ -73,7 +73,7 @@ extension BodyStructure.Multipart { /// (parameters and optional disposition/language information) to support future extensions /// without breaking existing clients. public struct Extension: Hashable, Sendable { - /// MIME parameters for the multipart structure itself (e.g., `boundary` parameter). + /// MIME parameters for the multipart structure itself (for example, the `boundary` parameter). /// /// Contains key/value pairs as an ordered dictionary, preserving the server's order. public var parameters: OrderedDictionary diff --git a/Sources/NIOIMAPCore/Grammar/Body/Singlepart.swift b/Sources/NIOIMAPCore/Grammar/Body/Singlepart.swift index dded68ca..960cdea6 100644 --- a/Sources/NIOIMAPCore/Grammar/Body/Singlepart.swift +++ b/Sources/NIOIMAPCore/Grammar/Body/Singlepart.swift @@ -18,7 +18,7 @@ extension BodyStructure { /// A single-part MIME message body as defined in RFC 3501. /// /// A single-part body represents a message containing only one MIME part. This includes simple - /// media types (e.g., `text/plain`, `image/jpeg`), the `message/rfc822` encapsulated message type, + /// media types (for example, `text/plain` or `image/jpeg`), the `message/rfc822` encapsulated message type, /// and text-specific types. Single-part bodies may have optional extension fields for forward compatibility. /// /// ### Example @@ -27,7 +27,7 @@ extension BodyStructure { /// ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 3445 65) /// ``` /// - /// This is parsed as a ``Singlepart`` with `kind: .text(...)`, `fields: Fields(...)`, and no extension. + /// The wire format above is parsed as a ``Singlepart`` with `kind: .text(...)`, `fields: Fields(...)`, and no extension. /// /// - SeeAlso: [RFC 3501 Section 2.6.3](https://datatracker.ietf.org/doc/html/rfc3501#section-2.6.3) /// - SeeAlso: ``Kind`` @@ -65,19 +65,19 @@ extension BodyStructure.Singlepart { /// Represents the three main kinds of single-part bodies: basic media types, encapsulated messages, /// and text-specific types. Each kind may have additional properties specific to that type. public indirect enum Kind: Hashable, Sendable { - /// A simple, non-message media type (e.g., `image/jpeg`, `application/pdf`). + /// A simple, non-message media type (for example, `image/jpeg` or `application/pdf`). /// /// The associated ``Media/MediaType`` specifies the exact MIME type and subtype. case basic(Media.MediaType) - /// An encapsulated RFC 822 email message (e.g., `message/rfc822`). + /// An encapsulated RFC 822 email message (for example, `message/rfc822`). /// /// The associated ``Message`` contains the envelope and nested body of the embedded message. case message(Message) /// A text-specific body type with optional line count information. /// - /// The associated ``Text`` specifies the text subtype (e.g., `plain` or `html`). + /// The associated ``Text`` specifies the text subtype (for example, `plain` or `html`). case text(Text) } @@ -94,12 +94,10 @@ extension BodyStructure.Singlepart { /// The hierarchical body structure of the embedded message. /// - /// This may itself be multipart, creating arbitrarily deep nesting of messages. + /// May itself be multipart, creating arbitrarily deep nesting of messages. public var body: BodyStructure /// The number of lines in the message (per RFC 2045/RFC 3501). - /// - /// This is the line count of the message in its canonical form. public var lineCount: Int /// Creates a new encapsulated message. @@ -117,10 +115,10 @@ extension BodyStructure.Singlepart { /// A text-specific body part with MIME type `text/*` (RFC 3501). /// - /// Text bodies are specialized single-part bodies with a specific subtype (e.g., `plain`, `html`) + /// Text bodies are specialized single-part bodies with a specific subtype (for example, `plain` or `html`) /// and an associated line count. public struct Text: Hashable, Sendable { - /// The text subtype (e.g., `plain` for `text/plain`, `html` for `text/html`). + /// The text subtype (for example, `plain` for `text/plain` or `html` for `text/html`). public var mediaSubtype: Media.Subtype /// The number of lines in the text body (per RFC 2045/RFC 3501). @@ -129,7 +127,7 @@ extension BodyStructure.Singlepart { public var lineCount: Int /// Creates a new text body. - /// - parameter mediaSubtype: The text subtype (e.g., `plain` or `html`) + /// - parameter mediaSubtype: The text subtype (for example, `plain` or `html`) /// - parameter lineCount: The number of lines in the text public init(mediaSubtype: Media.Subtype, lineCount: Int) { self.mediaSubtype = mediaSubtype diff --git a/Sources/NIOIMAPCore/Grammar/ByteRange/MessagePathByteRange.swift b/Sources/NIOIMAPCore/Grammar/ByteRange/MessagePathByteRange.swift index abcd4ac0..99d34979 100644 --- a/Sources/NIOIMAPCore/Grammar/ByteRange/MessagePathByteRange.swift +++ b/Sources/NIOIMAPCore/Grammar/ByteRange/MessagePathByteRange.swift @@ -15,7 +15,7 @@ extension MessagePath { /// A byte range suffix for partial IMAP URL fetches. /// - /// This type wraps a ``/NIOIMAPCore/ByteRange`` for use in IMAP URLs with the `/;PARTIAL=` encoding + /// Wraps a ``/NIOIMAPCore/ByteRange`` for use in IMAP URLs with the `/;PARTIAL=` encoding /// (RFC 5092). It enables clients to request only a portion of a message via URL without /// downloading the entire body. /// diff --git a/Sources/NIOIMAPCore/Grammar/Capability.swift b/Sources/NIOIMAPCore/Grammar/Capability.swift index 64a1a2e2..84dc6719 100644 --- a/Sources/NIOIMAPCore/Grammar/Capability.swift +++ b/Sources/NIOIMAPCore/Grammar/Capability.swift @@ -30,7 +30,7 @@ import struct NIO.ByteBuffer /// S: * CAPABILITY IMAP4rev1 STARTTLS AUTH=GSSAPI XPIG-LATIN /// ``` /// -/// This server response advertises capabilities: `IMAP4rev1` (simple), `STARTTLS` (simple), `AUTH=GSSAPI` +/// The server response advertises capabilities: `IMAP4rev1` (simple), `STARTTLS` (simple), `AUTH=GSSAPI` /// (configurable with name `AUTH` and value `GSSAPI`), and `XPIG-LATIN` (custom vendor extension). /// /// - SeeAlso: [RFC 3501 Section 7.2.1](https://datatracker.ietf.org/doc/html/rfc3501#section-7.2.1) @@ -50,9 +50,9 @@ public struct Capability: Hashable, Sendable { return String(self.rawValue[.., MailboxName) @@ -472,7 +472,7 @@ public enum Command: Hashable, Sendable { /// - Parameters: /// - criteria: One or more ``SortCriterion`` values defining the sort order. Later criteria /// are used as tie-breakers when earlier criteria produce equal values. - /// - charset: The character set for string comparisons (e.g., `"UTF-8"`, `"US-ASCII"`). Required. + /// - charset: The character set for string comparisons (for example, `"UTF-8"` or `"US-ASCII"`). Required. /// - key: The ``SearchKey`` filtering which messages to include in the result. /// - returnOptions: Optional ``SearchReturnOption`` values controlling the response format. /// @@ -544,7 +544,7 @@ public enum Command: Hashable, Sendable { /// Performs a “multimailbox” search as defined in RFC 7377. /// - /// This command enables searching across multiple mailboxes in a single request. The search results are + /// Enables searching across multiple mailboxes in a single request. The search results are /// returned using the `ESEARCH` response format defined in RFC 4731, which includes optional `MIN`, `MAX`, /// `COUNT`, and `ALL` return options. This command is equivalent to the extended `SEARCH` command but can /// target multiple mailboxes via the ``MailboxFilter`` and ``Mailboxes`` filters. @@ -1119,7 +1119,7 @@ extension Command { } /// Convenience for creating a *UID MOVE* command. - /// Pass in a `UIDSet`, and if that set is valid (i.e. non-empty) then a command is returned. + /// Pass in a `UIDSet`, and if that set is valid (that is, non-empty) then a command is returned. /// - parameter messages: The set of message UIDs to use. /// - parameter mailbox: The destination mailbox. /// - returns: `nil` if `messages` is empty, otherwise a `Command`. @@ -1131,7 +1131,7 @@ extension Command { } /// Convenience for creating a *UID COPY* command. - /// Pass in a `UIDSet`, and if that set is valid (i.e. non-empty) then a command is returned. + /// Pass in a `UIDSet`, and if that set is valid (that is, non-empty) then a command is returned. /// - parameter messages: The set of message UIDs to use. /// - parameter mailbox: The destination mailbox. /// - returns: `nil` if `messages` is empty, otherwise a `Command`. @@ -1143,7 +1143,7 @@ extension Command { } /// Convenience for creating a *UID FETCH* command. - /// Pass in a `UIDSet`, and if that set is valid (i.e. non-empty) then a command is returned. + /// Pass in a `UIDSet`, and if that set is valid (that is, non-empty) then a command is returned. /// - parameter messages: The set of message UIDs to use. /// - parameter attributes: Which attributes to retrieve. /// - parameter modifiers: Fetch modifiers. @@ -1157,7 +1157,7 @@ extension Command { } /// Convenience for creating a *UID STORE* command. - /// Pass in a `UIDSet`, and if that set is valid (i.e. non-empty) then a command is returned. + /// Pass in a `UIDSet`, and if that set is valid (that is, non-empty) then a command is returned. /// - parameter messages: The set of message UIDs to use. /// - parameter modifiers: Store modifiers. /// - parameter data: The store data to apply. @@ -1170,7 +1170,7 @@ extension Command { } /// Convenience for creating a *UID EXPUNGE* command. - /// Pass in a `UIDSet`, and if that set is valid (i.e. non-empty) then a command is returned. + /// Pass in a `UIDSet`, and if that set is valid (that is, non-empty) then a command is returned. /// - parameter messages: The set of message UIDs to use. /// - parameter mailbox: The mailbox on which to perform the expunge. /// - returns: `nil` if `messages` is empty, otherwise a `Command`. diff --git a/Sources/NIOIMAPCore/Grammar/Command/CommandStreamPart.swift b/Sources/NIOIMAPCore/Grammar/Command/CommandStreamPart.swift index 332ff9b5..84c18a2a 100644 --- a/Sources/NIOIMAPCore/Grammar/Command/CommandStreamPart.swift +++ b/Sources/NIOIMAPCore/Grammar/Command/CommandStreamPart.swift @@ -34,7 +34,7 @@ import struct NIO.ByteBuffer /// S: A001 OK APPEND completed /// ``` /// -/// This wire format is managed through multiple `AppendCommand` values: +/// The wire format above is managed through multiple `AppendCommand` values: /// - `start(tag: "A001", appendingTo: "INBOX")` produces the command prefix /// - `beginMessage(...)` produces the metadata (flags, date, size) /// - `messageBytes(buffer)` streams the message data @@ -137,7 +137,7 @@ public enum AppendCommand: Hashable, Sendable { extension AppendCommand { /// Management of inline data catenation using the `CATENATE` extension (RFC 4469). /// - /// This enum manages the lifecycle of sending inline data as part of a catenation. + /// Manages the lifecycle of sending inline data as part of a catenation. /// One `begin(size:)` message must be sent before exactly one `end` message, with /// zero or more `bytes(_:)` messages in between. /// @@ -250,7 +250,7 @@ public enum CommandStreamPart: Hashable, Sendable { /// Sends data in response to a server continuation request (`+`). /// - /// When a server sends a continuation request (e.g., during authentication or + /// When a server sends a continuation request (for example, during authentication or /// literal data upload), the client responds with this case. The buffer typically /// contains base64-encoded credentials for `AUTHENTICATE` commands or raw message /// bytes for message uploads. diff --git a/Sources/NIOIMAPCore/Grammar/Command/CustomCommandPayload.swift b/Sources/NIOIMAPCore/Grammar/Command/CustomCommandPayload.swift index 646d26b9..cf47a894 100644 --- a/Sources/NIOIMAPCore/Grammar/Command/CustomCommandPayload.swift +++ b/Sources/NIOIMAPCore/Grammar/Command/CustomCommandPayload.swift @@ -36,7 +36,7 @@ extension Command { /// literal with `{size}\r\n` prefix followed by the raw bytes. Otherwise, they /// are sent as a quoted string with `"..."` syntax. /// - /// This is the safer option when the payload should be treated as data rather + /// The safer option when the payload should be treated as data rather /// than protocol syntax. /// /// ### Example diff --git a/Sources/NIOIMAPCore/Grammar/ConditionalStore/ConditionalStore.swift b/Sources/NIOIMAPCore/Grammar/ConditionalStore/ConditionalStore.swift index 9fe9ee52..ab4d9acb 100644 --- a/Sources/NIOIMAPCore/Grammar/ConditionalStore/ConditionalStore.swift +++ b/Sources/NIOIMAPCore/Grammar/ConditionalStore/ConditionalStore.swift @@ -40,7 +40,7 @@ import struct NIO.ByteBuffer /// sequence tracking is enabled for this mailbox. The server responds with `* OK [MODSEQ 12345]` /// indicating the current modification sequence value. /// -/// ## Related Types +/// ## Related types /// /// - See ``SearchModificationSequence`` for conditional search operations /// - See ``StoreModifier`` for conditional store modifiers in STORE commands diff --git a/Sources/NIOIMAPCore/Grammar/Date/IMAPDate.swift b/Sources/NIOIMAPCore/Grammar/Date/IMAPDate.swift index d4bdb06f..7d0eb5f5 100644 --- a/Sources/NIOIMAPCore/Grammar/Date/IMAPDate.swift +++ b/Sources/NIOIMAPCore/Grammar/Date/IMAPDate.swift @@ -17,12 +17,12 @@ import struct NIO.ByteBuffer /// A calendar day formatted as `dd-MMM-yyyy` as defined in RFC 3501. /// /// This type represents a date in the IMAP date format, where the month is represented -/// as a three-letter abbreviation (e.g., `Jan`, `Feb`, etc.). This format is used in various +/// as a three-letter abbreviation (for example, `Jan` or `Feb`). This format is used in various /// IMAP protocol messages including the `INTERNALDATE` message attribute and `APPEND` commands. /// /// The `IMAPCalendarDay` provides basic validation of date components. Note that the /// validation checks component ranges but does not validate whether the combination -/// represents a valid calendar date (e.g., February 30 is accepted). +/// represents a valid calendar date (for example, February 30 is accepted). /// /// ### Example /// @@ -37,8 +37,8 @@ import struct NIO.ByteBuffer public struct IMAPCalendarDay: Hashable, Sendable { /// The year, constrained to the range `1900...2500`. /// - /// This is a 4-digit year value. The range constraint reflects common IMAP server - /// implementations which typically support dates in this range. + /// A 4-digit year value. The range constraint covers common IMAP server + /// implementations. public let year: Int /// The month, constrained to the range `1...12`. @@ -49,7 +49,7 @@ public struct IMAPCalendarDay: Hashable, Sendable { /// The day of the month, constrained to the range `1...31`. /// /// The range accepts all valid day numbers across different months. No validation - /// is performed to verify the day is valid for the specific month (e.g., February 30 is accepted). + /// is performed to verify the day is valid for the specific month (for example, February 30 is accepted). public let day: Int /// Creates a new `IMAPCalendarDay` and performs basic validation on the input. @@ -88,7 +88,7 @@ extension EncodeBuffer { extension IMAPCalendarDay { /// The three-letter month abbreviation for this calendar day. /// - /// Returns the month name as used in the IMAP date format (e.g., `Jan`, `Feb`, `Mar`, etc.). + /// Returns the month name as used in the IMAP date format (for example, `Jan`, `Feb`, or `Mar`). fileprivate var monthString: String { switch month { case 1: return "Jan" diff --git a/Sources/NIOIMAPCore/Grammar/Date/InternalDate.swift b/Sources/NIOIMAPCore/Grammar/Date/InternalDate.swift index 31b3c21d..149655f6 100644 --- a/Sources/NIOIMAPCore/Grammar/Date/InternalDate.swift +++ b/Sources/NIOIMAPCore/Grammar/Date/InternalDate.swift @@ -14,7 +14,7 @@ /// The internal date and time of a message as stored on the server. /// -/// This type represents the server's record of when a message was received or stored, +/// Represents the server's record of when a message was received or stored, /// not the date from the message's headers (which is represented by ``InternetMessageDate``). /// The internal date consists of a calendar date, time of day, and timezone offset. /// @@ -28,7 +28,7 @@ /// * 1 FETCH (INTERNALDATE “15-Mar-2026 10:30:45 +0100”) /// ``` /// -/// This response indicates the message was received on March 15, 2026 at 10:30:45 AM +/// The response indicates the message was received on March 15, 2026 at 10:30:45 AM /// in the UTC+01:00 timezone. This is wrapped as ``ServerMessageDate`` with components /// accessible via the ``components`` property. /// @@ -38,7 +38,7 @@ public struct ServerMessageDate: Hashable, Sendable { /// The individual date and time components for this internal date. /// - /// This computed property extracts the encoded date, time, and timezone components + /// Extracts the encoded date, time, and timezone components /// from the compact internal representation. The components can be used to /// display or work with individual date and time fields. /// @@ -82,7 +82,7 @@ public struct ServerMessageDate: Hashable, Sendable { /// Creates a new `ServerMessageDate` from individual date and time components. /// - /// This initializer constructs a ``ServerMessageDate`` by encoding the provided + /// Constructs a ``ServerMessageDate`` by encoding the provided /// components into the compact rawValue representation. /// /// - Parameter components: A ``Components`` structure containing the date, time, and timezone information. @@ -139,11 +139,11 @@ extension ServerMessageDate { /// let date = ServerMessageDate(components) /// ``` /// - /// This creates an ``ServerMessageDate`` representing March 15, 2026 at 10:30:45 UTC+01:00. + /// Creates a ``ServerMessageDate`` representing March 15, 2026 at 10:30:45 UTC+01:00. public struct Components: Sendable { /// The year, typically represented as a 4-digit integer. /// - /// This is a full year value (e.g., 2026), constrained to fit within an unsigned 16-bit integer. + /// A full year value (for example, 2026), constrained to fit within an unsigned 16-bit integer. public let year: Int /// The month, typically represented as a 2-digit integer in the range `1...12`. diff --git a/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchOptions.swift b/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchOptions.swift index 0b37e1bf..cd8e41d9 100644 --- a/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchOptions.swift +++ b/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchOptions.swift @@ -36,7 +36,7 @@ import struct NIO.ByteBuffer /// `UNSEEN` search criteria. The response is ``Response/untagged(_:)`` containing /// ``ResponsePayload/mailboxData(_:)`` with ``MailboxData/extendedSearch(_:)``. /// -/// ## Related Types +/// ## Related types /// /// - See ``SearchKey`` for search criteria /// - See ``SearchReturnOption`` for return options @@ -60,14 +60,14 @@ public struct ExtendedSearchOptions: Hashable, Sendable { /// Return options that filter and shape the data returned from the search. /// - /// Specifies which fields should be returned in the search response (e.g., ``SearchReturnOption/min``, - /// ``SearchReturnOption/max``, ``SearchReturnOption/all``, etc.). + /// Specifies which fields should be returned in the search response (for example, ``SearchReturnOption/min``, + /// ``SearchReturnOption/max``, or ``SearchReturnOption/all``). public var returnOptions: [SearchReturnOption] /// The mailboxes and scope to search across. /// /// Specifies which mailbox(es) to include in the search operation using mailbox filters - /// (e.g., personal namespace, specific mailbox names). When `nil`, the current mailbox context is used. + /// (for example, personal namespace or specific mailbox names). When `nil`, the current mailbox context is used. public var sourceOptions: ExtendedSearchSourceOptions? /// Creates a new `ExtendedSearchOptions` for multi-mailbox search. diff --git a/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchScopeOptions.swift b/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchScopeOptions.swift index e398c85c..e4aec8f1 100644 --- a/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchScopeOptions.swift +++ b/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchScopeOptions.swift @@ -24,7 +24,7 @@ import struct OrderedCollections.OrderedDictionary /// These options are specified as key-value pairs and are optional in search commands. /// See [RFC 7377 Section 2.1.1](https://datatracker.ietf.org/doc/html/rfc7377#section-2.1.1) for details. /// -/// ## Related Types +/// ## Related types /// /// - See ``ExtendedSearchSourceOptions`` for mailbox selection /// - See ``ExtendedSearchOptions`` for complete search options diff --git a/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchSourceOptions.swift b/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchSourceOptions.swift index ad780537..4a1e1e51 100644 --- a/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchSourceOptions.swift +++ b/Sources/NIOIMAPCore/Grammar/ESearch/ExtendedSearchSourceOptions.swift @@ -19,7 +19,7 @@ import struct NIO.ByteBuffer /// **Requires server capability:** ``Capability/multiSearch`` /// /// Source options define the mailbox context for an extended search operation, allowing searches to span -/// multiple mailboxes using mailbox filters (e.g., personal namespace mailboxes, specific named mailboxes). +/// multiple mailboxes using mailbox filters (for example, personal namespace mailboxes or specific named mailboxes). /// The `IN` clause specifies one or more mailbox filters, and optional scope options can further refine /// the search context. See [RFC 7377 Section 2.1.1](https://datatracker.ietf.org/doc/html/rfc7377#section-2.1.1). /// @@ -35,7 +35,7 @@ import struct NIO.ByteBuffer /// - ``MailboxFilter/personal`` - all personal mailboxes /// - ``MailboxFilter/subtree(_:)`` - the "Archive" mailbox and its subfolders /// -/// ## Related Types +/// ## Related types /// /// - See ``MailboxFilter`` for individual mailbox filter types /// - See ``ExtendedSearchOptions`` for complete search options @@ -46,7 +46,7 @@ public struct ExtendedSearchSourceOptions: Hashable, Sendable { /// Array of mailbox filters specifying which mailboxes to search. /// /// At least one mailbox filter must be present. Multiple filters can be combined to search - /// across different mailbox categories (e.g., personal mailboxes, specific named mailboxes, + /// across different mailbox categories (for example, personal mailboxes, specific named mailboxes, or /// subscribed mailboxes). public let sourceMailbox: [MailboxFilter] diff --git a/Sources/NIOIMAPCore/Grammar/EmailAddress.swift b/Sources/NIOIMAPCore/Grammar/EmailAddress.swift index 9df9b284..386c053c 100644 --- a/Sources/NIOIMAPCore/Grammar/EmailAddress.swift +++ b/Sources/NIOIMAPCore/Grammar/EmailAddress.swift @@ -16,7 +16,7 @@ import struct NIO.ByteBuffer /// An RFC 2822 electronic mail address with structured components. /// -/// This type represents an address as returned in the `ENVELOPE` structure of a `FETCH` response. +/// Represents an address as returned in the `ENVELOPE` structure of a `FETCH` response. /// The `ENVELOPE` address format breaks email addresses into four distinct components to help applications /// display mail headers consistently and reliably. /// @@ -30,7 +30,7 @@ import struct NIO.ByteBuffer /// S: * 1 FETCH (ENVELOPE (NIL "Alice Smith" "alice" "example.com" ...)) /// ``` /// -/// This response contains an address with nil at-domain-list, personName "Alice Smith", mailbox "alice", and host "example.com". +/// The response contains an address with nil at-domain-list, personName "Alice Smith", mailbox "alice", and host "example.com". /// /// - SeeAlso: [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2) public struct EmailAddress: Hashable, Sendable { diff --git a/Sources/NIOIMAPCore/Grammar/EncodedAuthenticationType.swift b/Sources/NIOIMAPCore/Grammar/EncodedAuthenticationType.swift index f38820c0..8906ce8f 100644 --- a/Sources/NIOIMAPCore/Grammar/EncodedAuthenticationType.swift +++ b/Sources/NIOIMAPCore/Grammar/EncodedAuthenticationType.swift @@ -20,7 +20,7 @@ import struct NIO.ByteBuffer /// When the mechanism name contains characters that are not allowed in URLs, the name must be /// percent-encoded using UTF-8 followed by hexadecimal encoding (RFC 2192, RFC 3986). /// -/// This type wraps a percent-encoded authentication mechanism name for use in URL construction. +/// Wraps a percent-encoded authentication mechanism name for use in URL construction. /// The encoded string contains only ASCII-safe characters and can be safely included in IMAP URL syntax. /// /// ### Examples @@ -48,7 +48,7 @@ import struct NIO.ByteBuffer /// ) /// ``` /// -/// ## Related Types +/// ## Related types /// /// See ``IMAPURLAuthenticationMechanism`` for the authentication mechanism specification, /// ``UserAuthenticationMechanism`` for how mechanisms are combined with user identifiers, diff --git a/Sources/NIOIMAPCore/Grammar/EncodedMailbox.swift b/Sources/NIOIMAPCore/Grammar/EncodedMailbox.swift index 6deea9c4..0822c54e 100644 --- a/Sources/NIOIMAPCore/Grammar/EncodedMailbox.swift +++ b/Sources/NIOIMAPCore/Grammar/EncodedMailbox.swift @@ -21,7 +21,7 @@ import struct NIO.ByteBuffer /// characters), the name must be percent-encoded using UTF-8 followed by hexadecimal encoding /// (RFC 2192, RFC 3986). /// -/// This type wraps a percent-encoded mailbox name for use in URL construction. The encoded +/// Wraps a percent-encoded mailbox name for use in URL construction. The encoded /// string contains only ASCII-safe characters and can be safely included in IMAP URL syntax. /// /// ### Example @@ -46,7 +46,7 @@ import struct NIO.ByteBuffer /// ) /// ``` /// -/// ## Related Types +/// ## Related types /// /// See ``MailboxUIDValidity`` for mailbox references with UID validity values, and /// ``MessagePath`` for the complete message location specification in URLs. diff --git a/Sources/NIOIMAPCore/Grammar/EncodedSearchQuery.swift b/Sources/NIOIMAPCore/Grammar/EncodedSearchQuery.swift index 09361501..d1cbba7c 100644 --- a/Sources/NIOIMAPCore/Grammar/EncodedSearchQuery.swift +++ b/Sources/NIOIMAPCore/Grammar/EncodedSearchQuery.swift @@ -14,7 +14,7 @@ /// A mailbox reference paired with an optional percent-encoded search query. /// -/// This type combines a mailbox identifier with UID validity and an optional search query for use +/// Combines a mailbox identifier with UID validity and an optional search query for use /// in IMAP URLs (RFC 5092). It specifies both which mailbox to search and what to search for. /// /// - SeeAlso: [RFC 5092 IMAP URL Scheme](https://datatracker.ietf.org/doc/html/rfc5092) diff --git a/Sources/NIOIMAPCore/Grammar/EncodedSection.swift b/Sources/NIOIMAPCore/Grammar/EncodedSection.swift index 361dd7ee..987dcc06 100644 --- a/Sources/NIOIMAPCore/Grammar/EncodedSection.swift +++ b/Sources/NIOIMAPCore/Grammar/EncodedSection.swift @@ -17,10 +17,10 @@ import struct NIO.ByteBuffer /// A percent-encoded message section reference for use in IMAP URLs. /// /// IMAP message sections (as defined in RFC 3501) specify parts of message structures -/// using dot-separated numeric notation (e.g., "1", "1.2", "1.2.3"). When used in IMAP URLs, +/// using dot-separated numeric notation (for example, "1", "1.2", or "1.2.3"). When used in IMAP URLs, /// section references are percent-encoded to ensure URL safety (RFC 2192, RFC 3986). /// -/// This type wraps a percent-encoded section reference for use in URL construction. +/// Wraps a percent-encoded section reference for use in URL construction. /// The encoded string contains only ASCII-safe characters and can be safely included in IMAP URL syntax. /// /// ### Example @@ -42,7 +42,7 @@ import struct NIO.ByteBuffer /// ) /// ``` /// -/// ## Related Types +/// ## Related types /// /// See ``URLMessageSection`` for the complete message section specification, /// ``MessagePath`` for the full message location including sections, and diff --git a/Sources/NIOIMAPCore/Grammar/EncodedUrlAuth.swift b/Sources/NIOIMAPCore/Grammar/EncodedUrlAuth.swift index 241e1a9a..e9c5b43c 100644 --- a/Sources/NIOIMAPCore/Grammar/EncodedUrlAuth.swift +++ b/Sources/NIOIMAPCore/Grammar/EncodedUrlAuth.swift @@ -24,7 +24,7 @@ import struct NIO.ByteBuffer /// The token appears in the final component of the URLAUTH extension: /// `;URLAUTH=::` /// -/// This type wraps the hexadecimal-encoded token string for use in URLAUTH verification +/// Wraps the hexadecimal-encoded token string for use in URLAUTH verification /// structures (via ``AuthenticatedURLVerifier``). /// /// ### Example @@ -45,7 +45,7 @@ import struct NIO.ByteBuffer /// When a client later uses this URL with URLFETCH, the server re-calculates the token /// to verify authorization before returning the message data. /// -/// ## Related Types +/// ## Related types /// /// See ``URLAuthenticationMechanism`` for the mechanism specification, ``AuthenticatedURLVerifier`` /// for the complete mechanism and token pair, and ``AuthenticatedURL`` for the full @@ -57,7 +57,7 @@ import struct NIO.ByteBuffer public struct EncodedAuthenticatedURL: Hashable, Sendable { /// The hexadecimal-encoded authorization token string. /// - /// This is an ASCII-encoded hexadecimal representation of the token bytes. The RFC 4467 + /// An ASCII-encoded hexadecimal representation of the token bytes. The RFC 4467 /// specification recommends using hexadecimal instead of Base64 to avoid URL-problematic /// padding characters. public var data: String diff --git a/Sources/NIOIMAPCore/Grammar/EncodedUser.swift b/Sources/NIOIMAPCore/Grammar/EncodedUser.swift index 189b708a..eb5a01a2 100644 --- a/Sources/NIOIMAPCore/Grammar/EncodedUser.swift +++ b/Sources/NIOIMAPCore/Grammar/EncodedUser.swift @@ -20,7 +20,7 @@ import struct NIO.ByteBuffer /// characters. This encoding is applied when a user identifier contains non-ASCII characters, /// spaces, or special characters that are not allowed in URL syntax (RFC 2192, RFC 3986). /// -/// This type wraps a percent-encoded user identifier for use in server specifications +/// Wraps a percent-encoded user identifier for use in server specifications /// (via ``UserAuthenticationMechanism`` and ``IMAPServer``) and in URLAUTH access identifiers /// (via ``Access`` with `user+` and `submit+` prefixes). /// @@ -43,7 +43,7 @@ import struct NIO.ByteBuffer /// imap://owner@example.com/INBOX/;uid=20;urlauth=submit+Fr%C3%A9d%C3%A9ric:internal:... /// ``` /// -/// ## Related Types +/// ## Related types /// /// See ``Access`` for how encoded users are used in URLAUTH access identifiers, /// ``UserAuthenticationMechanism`` for server-level user specifications, and diff --git a/Sources/NIOIMAPCore/Grammar/Entry/EntryFlagName.swift b/Sources/NIOIMAPCore/Grammar/Entry/EntryFlagName.swift index 9c01daa4..687c148a 100644 --- a/Sources/NIOIMAPCore/Grammar/Entry/EntryFlagName.swift +++ b/Sources/NIOIMAPCore/Grammar/Entry/EntryFlagName.swift @@ -16,7 +16,7 @@ /// /// **Requires server capability:** ``Capability/metadata`` or ``Capability/metadataServer`` /// -/// This type wraps an ``AttributeFlag`` to represent it as a metadata entry name in the special +/// Wraps an ``AttributeFlag`` to represent it as a metadata entry name in the special /// `/flags/` namespace. Flag entries allow metadata operations on flag modification sequences /// through the entry name format `/flags/flagname`. See [RFC 5464](https://datatracker.ietf.org/doc/html/rfc5464) /// for details on metadata entry organization. @@ -32,7 +32,7 @@ /// The entry name `/flags/\Seen` is represented using ``EntryFlagName`` wrapping the /// ``AttributeFlag`` for `\Seen`. The value `12345` is the modification sequence for that flag. /// -/// ## Related Types +/// ## Related types /// /// - See ``AttributeFlag`` for system flag representation /// - See ``MetadataEntryName`` for general metadata entry names @@ -42,7 +42,7 @@ public struct EntryFlagName: Hashable, Sendable { /// The flag wrapped as a metadata entry. /// - /// Represents a system flag (e.g., `\Seen`, `\Flagged`, `\Deleted`) in metadata entry form. + /// Represents a system flag (for example, `\Seen`, `\Flagged`, or `\Deleted`) in metadata entry form. public var flag: AttributeFlag /// Creates a new `EntryFlagName` wrapping an `AttributeFlag`. diff --git a/Sources/NIOIMAPCore/Grammar/Entry/EntryKindRequest.swift b/Sources/NIOIMAPCore/Grammar/Entry/EntryKindRequest.swift index 3f77c187..34239a95 100644 --- a/Sources/NIOIMAPCore/Grammar/Entry/EntryKindRequest.swift +++ b/Sources/NIOIMAPCore/Grammar/Entry/EntryKindRequest.swift @@ -33,7 +33,7 @@ import struct NIO.ByteBuffer /// The `ALL` option in the command queries modification sequences for the specified flags, /// considering both private and shared metadata sources. /// -/// ## Related Types +/// ## Related types /// /// - See ``EntryKindResponse`` for server-returned entry type information /// - See ``MetadataOption`` for other metadata query options diff --git a/Sources/NIOIMAPCore/Grammar/Entry/EntryTypeResponse.swift b/Sources/NIOIMAPCore/Grammar/Entry/EntryTypeResponse.swift index 5b77a320..e3b4c2ad 100644 --- a/Sources/NIOIMAPCore/Grammar/Entry/EntryTypeResponse.swift +++ b/Sources/NIOIMAPCore/Grammar/Entry/EntryTypeResponse.swift @@ -20,7 +20,7 @@ import struct NIO.ByteBuffer /// /// Entry kind response indicates whether a metadata entry belongs to the private namespace /// (visible only to the authenticated user) or the shared namespace (visible to all users). -/// This information is returned by the server when responding to metadata queries. +/// The server returns this information when responding to metadata queries. /// See [RFC 5464 Section 3.3](https://datatracker.ietf.org/doc/html/rfc5464#section-3.3). /// /// ### Example @@ -34,7 +34,7 @@ import struct NIO.ByteBuffer /// The response includes the entry type `priv` to indicate that the `/flags/\Seen` modification /// sequence metadata is private to the authenticated user. /// -/// ## Related Types +/// ## Related types /// /// - See ``EntryKindRequest`` for client-side entry type specification /// - See ``MetadataResponse`` for complete metadata responses diff --git a/Sources/NIOIMAPCore/Grammar/Envelope.swift b/Sources/NIOIMAPCore/Grammar/Envelope.swift index 166315d8..d915f69b 100644 --- a/Sources/NIOIMAPCore/Grammar/Envelope.swift +++ b/Sources/NIOIMAPCore/Grammar/Envelope.swift @@ -46,13 +46,13 @@ public struct Envelope: Hashable, Sendable { /// The sender(s) of the message, as from the `From:` header. /// - /// This is the author or originator of the message content. Multiple addresses indicate + /// The author or originator of the message content. Multiple addresses indicate /// multiple authors are credited with writing the message. public var from: [EmailAddressListElement] /// The actual sender on behalf of the author, as from the `Sender:` header. /// - /// This is used when one entity sends a message on behalf of another (e.g., an assistant + /// Used when one entity sends a message on behalf of another (for example, an assistant /// sending mail on behalf of their boss). If absent, the `from` field should be used. public var sender: [EmailAddressListElement] @@ -80,12 +80,12 @@ public struct Envelope: Hashable, Sendable { /// The message ID of the message this message is replying to, as from the `In-Reply-To:` header. /// - /// This field links this message to a previous message in a conversation thread. + /// Links this message to a previous message in a conversation thread. public var inReplyTo: MessageID? /// The unique message identifier, as from the `Message-ID:` header. /// - /// This identifier is assigned by the originating SMTP server and is globally unique + /// Assigned by the originating SMTP server and globally unique /// for the originating system. public var messageID: MessageID? diff --git a/Sources/NIOIMAPCore/Grammar/Expire.swift b/Sources/NIOIMAPCore/Grammar/Expire.swift index e883d92d..9f022359 100644 --- a/Sources/NIOIMAPCore/Grammar/Expire.swift +++ b/Sources/NIOIMAPCore/Grammar/Expire.swift @@ -18,7 +18,7 @@ /// remains valid. After the expiration date and time, the IMAP server must reject the URL /// (RFC 4467 Section 3). /// -/// This is an optional component appended to IMAP URLs as `;EXPIRE=` (in RFC 3339 format). +/// An optional component appended to IMAP URLs as `;EXPIRE=` (in RFC 3339 format). /// If not specified, the URL has no expiration time, though it can still be revoked by other means /// (such as regenerating the mailbox access key). /// @@ -31,7 +31,7 @@ /// /// The `;expire=2025-12-31T23:59:59Z` component indicates the URL expires at that date and time. /// -/// ## Related Types +/// ## Related types /// /// See ``AuthenticatedURLRump`` for how expiration is combined with ``Access`` identifiers, /// and ``FullDateTime`` for the datetime format specification. @@ -41,7 +41,7 @@ public struct Expire: Hashable, Sendable { /// The latest date and time that a URLAUTH-authorized URL is valid. /// /// After this date and time, the URL must be rejected by the IMAP server. The datetime is - /// encoded in RFC 3339 format (e.g., `2025-12-31T23:59:59Z`). + /// encoded in RFC 3339 format (for example, `2025-12-31T23:59:59Z`). public var dateTime: FullDateTime /// Creates a new expiration date and time. diff --git a/Sources/NIOIMAPCore/Grammar/FetchAttribute.swift b/Sources/NIOIMAPCore/Grammar/FetchAttribute.swift index 89707604..96cb1a7c 100644 --- a/Sources/NIOIMAPCore/Grammar/FetchAttribute.swift +++ b/Sources/NIOIMAPCore/Grammar/FetchAttribute.swift @@ -20,11 +20,11 @@ import struct NIO.ByteBuffer /// This enum represents all available fetch attributes, including standard RFC 3501 attributes and /// attributes from various IMAP extensions. /// -/// ### Standard Attributes (RFC 3501) +/// ### Standard attributes (RFC 3501) /// /// Basic message properties like envelope, flags, internal date, and RFC 822 message format. /// -/// ### Extension Attributes +/// ### Extension attributes /// /// - `BODYSTRUCTURE`: Detailed message structure information (RFC 3501) /// - `BINARY`: Raw binary content of message sections (RFC 3516 BINARY extension) @@ -33,7 +33,7 @@ import struct NIO.ByteBuffer /// - `EMAILID` / `THREADID`: Message and thread identifiers (RFC 8474) /// - `X-GM-*`: Gmail-specific attributes (non-standard) /// -/// ### Attributes with Options +/// ### Attributes with options /// /// Some attributes support optional parameters: /// - ``bodySection(peek:_:_:)`` supports a `peek` flag (prevents \\Seen flag modification) and partial byte ranges @@ -57,7 +57,7 @@ public enum FetchAttribute: Hashable, Sendable { /// The message envelope structure containing sender, recipient, subject, and date information. /// /// Returns an ``Envelope`` structure with the sender, recipient lists, subject, and other message metadata. - /// This is a parsed representation of the message headers. + /// A parsed representation of the message headers. /// /// - SeeAlso: [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2) case envelope @@ -126,7 +126,7 @@ public enum FetchAttribute: Hashable, Sendable { /// their headers. Supports partial byte ranges for efficient fetching of large parts. /// /// - parameter peek: If `true`, does not set the `\Seen` flag on the message; if `false`, sets `\Seen` - /// - parameter section: The section specifier (e.g., `1`, `1.1`, `HEADER`, `TEXT`) + /// - parameter section: The section specifier (for example, `1`, `1.1`, `HEADER`, or `TEXT`) /// - parameter partial: Optional byte range `startOctet..?) @@ -168,7 +168,7 @@ public enum FetchAttribute: Hashable, Sendable { /// **Requires server capability:** ``Capability/binary`` /// /// - parameter peek: If `true`, does not set the `\Seen` flag; if `false`, sets `\Seen` - /// - parameter section: The specific MIME part to fetch (e.g., `1`, `1.1`) + /// - parameter section: The specific MIME part to fetch (for example, `1` or `1.1`) /// - parameter partial: Optional byte range to fetch only a portion /// - SeeAlso: [RFC 3516](https://datatracker.ietf.org/doc/html/rfc3516) case binary(peek: Bool, section: SectionSpecifier.Part, partial: ClosedRange?) @@ -185,7 +185,7 @@ public enum FetchAttribute: Hashable, Sendable { /// The message's Gmail-assigned message ID (Gmail extension, non-standard). /// - /// This is a Gmail-specific extension that returns the unique message identifier within + /// A Gmail-specific extension that returns the unique message identifier within /// Gmail's system. Not part of the IMAP standard. /// /// - SeeAlso: https://developers.google.com/gmail/imap/imap-extensions @@ -193,7 +193,7 @@ public enum FetchAttribute: Hashable, Sendable { /// The message's Gmail thread ID (Gmail extension, non-standard). /// - /// This is a Gmail-specific extension that returns the identifier for the thread/conversation + /// A Gmail-specific extension that returns the identifier for the thread/conversation /// this message belongs to. Not part of the IMAP standard. /// /// - SeeAlso: https://developers.google.com/gmail/imap/imap-extensions @@ -201,7 +201,7 @@ public enum FetchAttribute: Hashable, Sendable { /// The message's Gmail labels (Gmail extension, non-standard). /// - /// This is a Gmail-specific extension that returns the list of labels (like folders) applied + /// A Gmail-specific extension that returns the list of labels (like folders) applied /// to this message. Not part of the IMAP standard. /// /// - SeeAlso: https://developers.google.com/gmail/imap/imap-extensions diff --git a/Sources/NIOIMAPCore/Grammar/FetchModifier.swift b/Sources/NIOIMAPCore/Grammar/FetchModifier.swift index fa896032..7904eda3 100644 --- a/Sources/NIOIMAPCore/Grammar/FetchModifier.swift +++ b/Sources/NIOIMAPCore/Grammar/FetchModifier.swift @@ -57,7 +57,7 @@ public enum FetchModifier: Hashable, Sendable { /// A server extension modifier not defined in this library. /// - /// This case captures future `FETCH` modifiers defined by extensions, allowing forward compatibility + /// Captures future `FETCH` modifiers defined by extensions, allowing forward compatibility /// with new IMAP capabilities without requiring library updates. case other(KeyValue) } diff --git a/Sources/NIOIMAPCore/Grammar/Flag/Flag.swift b/Sources/NIOIMAPCore/Grammar/Flag/Flag.swift index ae6c247d..d126fc64 100644 --- a/Sources/NIOIMAPCore/Grammar/Flag/Flag.swift +++ b/Sources/NIOIMAPCore/Grammar/Flag/Flag.swift @@ -19,7 +19,7 @@ import struct NIO.ByteBuffer /// Flags are attributes attached to messages that indicate message state or special properties. /// They are part of the base [IMAP protocol](https://datatracker.ietf.org/doc/html/rfc3501). /// -/// ## Standard Flags +/// ## Standard flags /// /// [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) defines five standard system flags: /// - ``answered`` - The message has been replied to. @@ -28,12 +28,12 @@ import struct NIO.ByteBuffer /// - ``seen`` - The message has been read by the user. /// - ``draft`` - The message is incomplete and has not been sent. /// -/// ## Case Handling +/// ## Case handling /// /// Flags are compared case-insensitively, meaning `Flag("\\SEEN")` and `Flag("\\Seen")` are considered equal. /// Flags also preserve their original casing when encoded and decoded. /// -/// ## Extension Flags +/// ## Extension flags /// /// Beyond the five standard flags, custom flags can be created. These are defined in /// [RFC 3501 Section 2.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.2). @@ -94,30 +94,29 @@ extension Flag: CustomDebugStringConvertible { extension Flag { /// `\Answered` - The message has been replied to. /// - /// This standard flag ([RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501)) indicates that the + /// Defined in [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501). Indicates the /// message is a response to another message. public static let answered = Self("\\Answered") /// `\Flagged` - The message has been marked for attention. /// - /// This standard flag ([RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501)). + /// Defined in [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501). public static let flagged = Self("\\Flagged") /// `\Deleted` - The message has been deleted. /// - /// This standard flag ([RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501)) marks a message for - /// deletion. The message is not permanently removed until the ``Command/expunge`` command is executed - /// or the mailbox is closed. + /// Defined in [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501). Marks a message for + /// deletion until the ``Command/expunge`` command is executed or the mailbox is closed. public static let deleted = Self("\\Deleted") /// `\Seen` - The message has been read by the user. /// - /// This standard flag ([RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501)). + /// Defined in [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501). public static let seen = Self("\\Seen") /// `\Draft` - The message is not yet complete. /// - /// This standard flag ([RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501)). + /// Defined in [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501). public static let draft = Self("\\Draft") /// Convenience function to create a new flag from a `Keyword`. diff --git a/Sources/NIOIMAPCore/Grammar/Flag/FlagKeyword.swift b/Sources/NIOIMAPCore/Grammar/Flag/FlagKeyword.swift index 8ce30574..eb34e808 100644 --- a/Sources/NIOIMAPCore/Grammar/Flag/FlagKeyword.swift +++ b/Sources/NIOIMAPCore/Grammar/Flag/FlagKeyword.swift @@ -51,7 +51,7 @@ extension Flag { /// The case-preserved raw string representation of the keyword. /// - /// This value preserves the original casing for wire format transmission, while comparison operations + /// Preserves the original casing for wire format transmission, while comparison operations /// use case-insensitive matching. let rawValue: String @@ -119,52 +119,52 @@ extension Flag.Keyword: CustomDebugStringConvertible { extension Flag.Keyword { /// The `$Forwarded` keyword, commonly used to mark messages that have been forwarded. /// - /// This is a registered keyword in the special-use keywords registry. + /// A registered keyword in the special-use keywords registry. public static let forwarded = Self(unchecked: "$Forwarded") /// The `$Junk` keyword, commonly used to mark messages as spam or junk mail. /// - /// This is a registered keyword in the special-use keywords registry. + /// A registered keyword in the special-use keywords registry. public static let junk = Self(unchecked: "$Junk") /// The `$NotJunk` keyword, commonly used to mark messages as not spam. /// - /// This is a registered keyword in the special-use keywords registry. + /// A registered keyword in the special-use keywords registry. public static let notJunk = Self(unchecked: "$NotJunk") /// The `Redirected` keyword (unregistered). /// - /// This is a non-standard keyword sometimes used by mail systems to mark redirected messages. + /// A non-standard keyword sometimes used by mail systems to mark redirected messages. public static let unregistered_redirected = Self(unchecked: "Redirected") /// The `Forwarded` keyword (unregistered). /// - /// This is a non-standard keyword for marking forwarded messages. Prefer ``forwarded`` for standard usage. + /// A non-standard keyword for marking forwarded messages. Prefer ``forwarded`` for standard usage. public static let unregistered_forwarded = Self(unchecked: "Forwarded") /// The `Junk` keyword (unregistered). /// - /// This is a non-standard keyword for marking spam. Prefer ``junk`` for standard usage. + /// A non-standard keyword for marking spam. Prefer ``junk`` for standard usage. public static let unregistered_junk = Self(unchecked: "Junk") /// The `NotJunk` keyword (unregistered). /// - /// This is a non-standard keyword for marking non-spam messages. Prefer ``notJunk`` for standard usage. + /// A non-standard keyword for marking non-spam messages. Prefer ``notJunk`` for standard usage. public static let unregistered_notJunk = Self(unchecked: "NotJunk") /// The `$MailFlagBit0` keyword for color marking (bit 0). /// - /// This keyword is commonly used by mail systems to represent color flags on messages, with different bits representing different colors. + /// A color-flag keyword for messages, where different bits represent different colors. public static let colorBit0 = Self(unchecked: "$MailFlagBit0") /// The `$MailFlagBit1` keyword for color marking (bit 1). /// - /// This keyword is commonly used by mail systems to represent color flags on messages. + /// A color-flag keyword for messages. public static let colorBit1 = Self(unchecked: "$MailFlagBit1") /// The `$MailFlagBit2` keyword for color marking (bit 2). /// - /// This keyword is commonly used by mail systems to represent color flags on messages. + /// A color-flag keyword for messages. public static let colorBit2 = Self(unchecked: "$MailFlagBit2") /// The `$MDNSent` keyword, indicating a Message Disposition Notification has been sent for this message. @@ -176,7 +176,7 @@ extension Flag.Keyword { extension Flag: ExpressibleByStringLiteral { /// Creates a flag from a string literal, used for creating static custom keywords. /// - /// This allows writing flags directly as string literals (e.g., `let flag: Flag = "$Custom"`), + /// This allows writing flags directly as string literals (for example, `let flag: Flag = "$Custom"`), /// which is useful for static keyword definitions and testing. /// /// - parameter value: The string literal to construct a keyword flag from. diff --git a/Sources/NIOIMAPCore/Grammar/Flag/StoreFlags.swift b/Sources/NIOIMAPCore/Grammar/Flag/StoreFlags.swift index 61625653..40d069a4 100644 --- a/Sources/NIOIMAPCore/Grammar/Flag/StoreFlags.swift +++ b/Sources/NIOIMAPCore/Grammar/Flag/StoreFlags.swift @@ -106,7 +106,7 @@ public struct StoreGmailLabels: Hashable, Sendable { /// Standard IMAP message flags for a `STORE` command. /// -/// This type specifies a set of flags to add to, remove from, or replace on messages via the `STORE` command. +/// Specifies a set of flags to add to, remove from, or replace on messages via the `STORE` command. /// The operation (add/remove/replace) and whether to suppress the server response are configured separately. /// /// Flags are described in [RFC 3501 Section 2.3](https://datatracker.ietf.org/doc/html/rfc3501#section-2.3) diff --git a/Sources/NIOIMAPCore/Grammar/FullAuthenticatedURL.swift b/Sources/NIOIMAPCore/Grammar/FullAuthenticatedURL.swift index 32084fe6..40101427 100644 --- a/Sources/NIOIMAPCore/Grammar/FullAuthenticatedURL.swift +++ b/Sources/NIOIMAPCore/Grammar/FullAuthenticatedURL.swift @@ -22,10 +22,10 @@ import struct NIO.ByteBuffer /// 1. **Network Message Path**: Server location and message content reference /// 2. **Authorization Information**: Complete URLAUTH with access, expiration, mechanism, and token /// -/// This is the endpoint of the GENURL AUTH flow: after GENURLAUTH is issued by the client, +/// The endpoint of the GENURL AUTH flow: after GENURLAUTH is issued by the client, /// the server returns one or more ``FullAuthenticatedURL`` structures wrapped in a GENURLAUTH response. /// -/// ### Complete URL Structure +/// ### Complete URL structure /// /// A full authenticated URL encompasses: /// ``` @@ -66,7 +66,7 @@ import struct NIO.ByteBuffer /// 4. **Client Uses URL**: Submits the complete URL to URLFETCH command /// 5. **Server Validates and Returns Data**: Verifies token and returns message content /// -/// ## Related Types +/// ## Related types /// /// - ``NetworkMessagePath`` provides server and message content specification /// - ``AuthenticatedURL`` provides complete URLAUTH authorization diff --git a/Sources/NIOIMAPCore/Grammar/FullDateTime.swift b/Sources/NIOIMAPCore/Grammar/FullDateTime.swift index 499211f2..b53ec534 100644 --- a/Sources/NIOIMAPCore/Grammar/FullDateTime.swift +++ b/Sources/NIOIMAPCore/Grammar/FullDateTime.swift @@ -14,7 +14,7 @@ /// A complete date and time value in RFC 3339 format with an optional fraction-of-second. /// -/// This type represents a full date-time specification as defined in RFC 3339, combining +/// Represents a full date-time specification as defined in RFC 3339, combining /// a ``FullDate`` and ``FullTime`` into a single value. RFC 3339 is used in IMAP extensions /// such as MULTIMAILBOX SEARCH (RFC 7377) and METADATA (RFC 5464) for precise timestamp representation. /// @@ -56,11 +56,11 @@ public struct FullDateTime: Hashable, Sendable { /// A calendar date in RFC 3339 format (`YYYY-MM-DD`). /// -/// This type represents a date value as defined in RFC 3339, containing year, month, and day +/// Represents a date value as defined in RFC 3339, containing year, month, and day /// components. It is used in combination with ``FullTime`` to form a complete ``FullDateTime``. /// /// The initializer uses `precondition` to verify month and day are within valid ranges but does -/// not validate whether the day is appropriate for the given month (e.g., February 30 is accepted). +/// not validate whether the day is appropriate for the given month (for example, February 30 is accepted). public struct FullDate: Hashable, Sendable { /// The year as any non-negative integer. /// @@ -76,12 +76,12 @@ public struct FullDate: Hashable, Sendable { /// The day in the range `1...31`. /// /// The range accepts all valid day numbers. No validation is performed to verify - /// the day is valid for the specific month (e.g., February 30 is accepted). + /// the day is valid for the specific month (for example, February 30 is accepted). public let day: Int /// Creates a new `FullDate`. /// - /// This initializer validates that month is in the range `1...12` and day is in the + /// Validates that month is in the range `1...12` and day is in the /// range `1...31` using `precondition`. The year can be any non-negative integer. /// /// - Parameters: @@ -99,7 +99,7 @@ public struct FullDate: Hashable, Sendable { /// A time of day in RFC 3339 format (`HH:MM:SS[.FRACTION]`). /// -/// This type represents a time value as defined in RFC 3339, containing hour, minute, second, +/// Represents a time value as defined in RFC 3339, containing hour, minute, second, /// and an optional fractional-second component. It is used in combination with ``FullDate`` /// to form a complete ``FullDateTime``. /// @@ -120,7 +120,7 @@ public struct FullTime: Hashable, Sendable { /// The fractional-second component, or `nil` if not included. /// - /// This is a partially-dynamic field and does not directly represent milliseconds, + /// A partially-dynamic field that does not directly represent milliseconds, /// microseconds, or any specific fractional unit. The number you provide is the number /// that will be written directly to the output. For example: /// - `123` encodes as `HH:MM:SS.123` diff --git a/Sources/NIOIMAPCore/Grammar/IMAPServer.swift b/Sources/NIOIMAPCore/Grammar/IMAPServer.swift index 9b05e350..491dbda2 100644 --- a/Sources/NIOIMAPCore/Grammar/IMAPServer.swift +++ b/Sources/NIOIMAPCore/Grammar/IMAPServer.swift @@ -55,7 +55,7 @@ import struct NIO.ByteBuffer /// S: * GENURLAUTH "imap://owner@example.com/INBOX/;uid=20;urlauth=user+fred:internal:..." /// ``` /// -/// ## Related Types +/// ## Related types /// /// See ``UserAuthenticationMechanism`` for the optional user and authentication specification, /// ``IMAPURLAuthenticationMechanism`` for authentication mechanism constraints, and diff --git a/Sources/NIOIMAPCore/Grammar/IMAPURL.swift b/Sources/NIOIMAPCore/Grammar/IMAPURL.swift index 7bd7e2fd..c03ba772 100644 --- a/Sources/NIOIMAPCore/Grammar/IMAPURL.swift +++ b/Sources/NIOIMAPCore/Grammar/IMAPURL.swift @@ -57,7 +57,7 @@ /// - **`/`**: Path separator /// - **Command** (``URLCommand``, optional): Mailbox, search, or fetch operation /// -/// ## Related Types +/// ## Related types /// /// - ``IMAPServer`` provides server connection specification /// - ``UserAuthenticationMechanism`` specifies user and auth mechanism diff --git a/Sources/NIOIMAPCore/Grammar/IMAPURLAuthenticationMechanism.swift b/Sources/NIOIMAPCore/Grammar/IMAPURLAuthenticationMechanism.swift index e29116cf..147e45d7 100644 --- a/Sources/NIOIMAPCore/Grammar/IMAPURLAuthenticationMechanism.swift +++ b/Sources/NIOIMAPCore/Grammar/IMAPURLAuthenticationMechanism.swift @@ -52,7 +52,7 @@ /// // Represents: imap://user@example.com/;auth=PLAIN /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``UserAuthenticationMechanism`` combines user and mechanism specifications /// - ``IMAPServer`` uses mechanism specifications in server definitions diff --git a/Sources/NIOIMAPCore/Grammar/InternetMessageDate.swift b/Sources/NIOIMAPCore/Grammar/InternetMessageDate.swift index 9ca3c945..222823fb 100644 --- a/Sources/NIOIMAPCore/Grammar/InternetMessageDate.swift +++ b/Sources/NIOIMAPCore/Grammar/InternetMessageDate.swift @@ -14,7 +14,7 @@ /// A textual RFC 2822 date as it appears in email message headers. /// -/// This type represents the date field value from an email message's `Date` header, +/// Represents the date field value from an email message's `Date` header, /// formatted according to RFC 2822 section 3.3. Unlike ``ServerMessageDate``, which records /// when the server received the message, this date represents the date the message was /// composed by its sender. @@ -40,7 +40,7 @@ public struct InternetMessageDate: Hashable, Sendable { /// The string is stored as-is without parsing or validation. The caller is responsible /// for ensuring the string represents a valid RFC 2822 date format. /// - /// - Parameter string: A `String` containing the RFC 2822 date value (e.g., `”Fri, 15 Mar 2026 10:30:45 +0100”`). + /// - Parameter string: A `String` containing the RFC 2822 date value (for example, `”Fri, 15 Mar 2026 10:30:45 +0100”`). public init(_ string: String) { self.value = string } @@ -49,7 +49,7 @@ public struct InternetMessageDate: Hashable, Sendable { extension String { /// Creates a new ``Swift/String`` from an ``InternetMessageDate``. /// - /// This extracts the underlying string value from the ``InternetMessageDate``. + /// Extracts the underlying string value from the ``InternetMessageDate``. /// /// - Parameter date: The ``InternetMessageDate`` to convert. public init(_ date: InternetMessageDate) { @@ -60,7 +60,7 @@ extension String { extension InternetMessageDate: ExpressibleByStringLiteral { /// Creates a new `InternetMessageDate` from a string literal. /// - /// This allows you to write RFC 2822 dates as string literals: + /// Allows writing RFC 2822 dates as string literals: /// ```swift /// let date: InternetMessageDate = “Fri, 15 Mar 2026 10:30:45 +0100” /// ``` diff --git a/Sources/NIOIMAPCore/Grammar/KeyValue.swift b/Sources/NIOIMAPCore/Grammar/KeyValue.swift index 534c7f15..f71cf0ee 100644 --- a/Sources/NIOIMAPCore/Grammar/KeyValue.swift +++ b/Sources/NIOIMAPCore/Grammar/KeyValue.swift @@ -14,7 +14,7 @@ /// A generic key-value pair container. /// -/// This generic type is used throughout the IMAP protocol implementation to pair related values, +/// Used throughout the IMAP protocol implementation to pair related values, /// such as extension names with their parameters, vendor tags with their values, or tagged /// extension data with their content. /// diff --git a/Sources/NIOIMAPCore/Grammar/LastCommandMessageIdentifier.swift b/Sources/NIOIMAPCore/Grammar/LastCommandMessageIdentifier.swift index 6b6067e3..e37ad982 100644 --- a/Sources/NIOIMAPCore/Grammar/LastCommandMessageIdentifier.swift +++ b/Sources/NIOIMAPCore/Grammar/LastCommandMessageIdentifier.swift @@ -47,7 +47,7 @@ /// See [RFC 5182](https://datatracker.ietf.org/doc/html/rfc5182) for the full specification /// of the search result reference extension. /// -/// ## Related Types +/// ## Related types /// /// - ``LastCommandSet`` allows referencing the last search result as a message set instead of a single identifier. /// - ``MessageIdentifier`` represents a specific message identifier (``UID`` or ``SequenceNumber``). diff --git a/Sources/NIOIMAPCore/Grammar/LastCommandSet.swift b/Sources/NIOIMAPCore/Grammar/LastCommandSet.swift index 90932235..8e2362ef 100644 --- a/Sources/NIOIMAPCore/Grammar/LastCommandSet.swift +++ b/Sources/NIOIMAPCore/Grammar/LastCommandSet.swift @@ -20,7 +20,7 @@ /// /// **Requires server capability:** ``Capability/searchRes`` /// -/// The `$` marker can be used anywhere a message set is expected (e.g., in `FETCH`, `STORE`, +/// The `$` marker can be used anywhere a message set is expected (for example, in `FETCH`, `STORE`, /// `COPY`, `EXPUNGE` commands). It allows clients to pipeline a `SEARCH` command with subsequent /// operations without waiting for results and reformatting them. /// @@ -51,7 +51,7 @@ /// See [RFC 5182](https://datatracker.ietf.org/doc/html/rfc5182) for the full specification /// of the search result reference extension. /// -/// ## Related Types +/// ## Related types /// /// - ``LastCommandMessageID`` allows referencing the last search result as a single identifier instead of a set. /// - ``MessageIdentifierSet`` represents a specific non-empty set of message identifiers. @@ -59,7 +59,7 @@ public enum LastCommandSet: Hashable, Sendable { /// A specific non-empty set of message identifiers. /// - /// This set will be encoded and sent to the IMAP server. Example values: `1`, `5:10`, or `1,3,5:7,9:*`. + /// Encoded and sent to the IMAP server. Example values: `1`, `5:10`, or `1,3,5:7,9:*`. case set(MessageIdentifierSetNonEmpty) /// References the result of the most recent `SEARCH` command. diff --git a/Sources/NIOIMAPCore/Grammar/List/ListSelectBaseOption.swift b/Sources/NIOIMAPCore/Grammar/List/ListSelectBaseOption.swift index 689ceb8e..fb9e949e 100644 --- a/Sources/NIOIMAPCore/Grammar/List/ListSelectBaseOption.swift +++ b/Sources/NIOIMAPCore/Grammar/List/ListSelectBaseOption.swift @@ -32,7 +32,7 @@ import struct NIO.ByteBuffer /// /// The command `LIST SUBSCRIBED "" "*"` uses the ``subscribed`` base option to return only subscribed mailboxes. /// -/// ## Related Types +/// ## Related types /// /// Combine this with ``ListSelectOption`` values to add additional filtering constraints. /// See ``ListSelectOptions`` for how to construct a complete set of `LIST` selection options. @@ -41,7 +41,7 @@ import struct NIO.ByteBuffer public enum ListSelectBaseOption: Hashable, Sendable { /// The `SUBSCRIBED` base option returns only mailboxes the user has subscribed to. /// - /// This is the primary filtering mode that controls which mailboxes are included in the response. + /// The primary filtering mode that controls which mailboxes are included in the response. /// From [RFC 5258 Section 3.1](https://datatracker.ietf.org/doc/html/rfc5258#section-3.1). case subscribed diff --git a/Sources/NIOIMAPCore/Grammar/List/ListSelectIndependentOption.swift b/Sources/NIOIMAPCore/Grammar/List/ListSelectIndependentOption.swift index 5ba10693..b4637588 100644 --- a/Sources/NIOIMAPCore/Grammar/List/ListSelectIndependentOption.swift +++ b/Sources/NIOIMAPCore/Grammar/List/ListSelectIndependentOption.swift @@ -35,7 +35,7 @@ import struct NIO.ByteBuffer /// The command `LIST SUBSCRIBED (REMOTE SPECIAL-USE) "" "*"` uses the independent options /// ``remote`` and ``specialUse`` to return subscribed remote mailboxes marked with special-use attributes. /// -/// ## Related Types +/// ## Related types /// /// These differ from ``ListSelectOption`` which may have syntactic relationships. /// Combine independent options with ``ListSelectBaseOption`` using ``ListSelectOptions``. @@ -44,13 +44,13 @@ import struct NIO.ByteBuffer public enum ListSelectIndependentOption: Hashable, Sendable { /// The `REMOTE` independent option returns information about remote mailbox stores. /// - /// This asks the server to include mailboxes from remote mailbox stores in addition + /// Asks the server to include mailboxes from remote mailbox stores in addition /// to local mailboxes. From [RFC 5258 Section 3.2](https://datatracker.ietf.org/doc/html/rfc5258#section-3.2). case remote /// The `SPECIAL-USE` independent option returns only mailboxes with special-use attributes. /// - /// This filters results to mailboxes marked with attributes like `\All`, `\Archive`, `\Drafts`, + /// Filters results to mailboxes marked with attributes like `\All`, `\Archive`, `\Drafts`, /// `\Flagged`, `\Junk`, `\Sent`, or `\Trash` (from [RFC 6154](https://datatracker.ietf.org/doc/html/rfc6154)). case specialUse diff --git a/Sources/NIOIMAPCore/Grammar/List/ListSelectOption.swift b/Sources/NIOIMAPCore/Grammar/List/ListSelectOption.swift index dd3c44b2..6a58c36e 100644 --- a/Sources/NIOIMAPCore/Grammar/List/ListSelectOption.swift +++ b/Sources/NIOIMAPCore/Grammar/List/ListSelectOption.swift @@ -34,7 +34,7 @@ import struct NIO.ByteBuffer /// The command `LIST (SUBSCRIBED) "" "*"` uses the ``subscribed`` selection option to return only subscribed mailboxes. /// The resulting responses wrap mailbox information in ``Response/untagged(_:)`` cases. /// -/// ## Related Types +/// ## Related types /// /// Use ``ListSelectBaseOption`` for options that control the basic filtering mode, /// ``ListSelectIndependentOption`` for options that don't interact syntactically with other options, @@ -44,19 +44,19 @@ import struct NIO.ByteBuffer public enum ListSelectOption: Hashable, Sendable { /// The `SUBSCRIBED` selection option returns only mailboxes that the user has subscribed to. /// - /// This option filters the mailbox list to show subscription state rather than all mailboxes. + /// Filters the mailbox list to show subscription state rather than all mailboxes. /// From [RFC 5258 Section 3.1](https://datatracker.ietf.org/doc/html/rfc5258#section-3.1). case subscribed /// The `REMOTE` selection option requests mailbox information from remote mailbox stores. /// - /// This is used to include both remote and local mailboxes in the response. + /// Includes both remote and local mailboxes in the response. /// From [RFC 5258 Section 3.2](https://datatracker.ietf.org/doc/html/rfc5258#section-3.2). case remote /// The `SPECIAL-USE` selection option returns only mailboxes with special-use attributes. /// - /// This filters results to mailboxes marked with attributes like `\All`, `\Archive`, `\Drafts`, + /// Filters results to mailboxes marked with attributes like `\All`, `\Archive`, `\Drafts`, /// `\Flagged`, `\Junk`, `\Sent`, or `\Trash` (from [RFC 6154](https://datatracker.ietf.org/doc/html/rfc6154)). case specialUse @@ -77,7 +77,7 @@ public enum ListSelectOption: Hashable, Sendable { /// /// **Requires server capability:** ``Capability/listExtended`` /// -/// This structure represents the complete set of selection options for a `LIST` command, +/// Represents the complete set of selection options for a `LIST` command, /// combining a base mode with additional filtering criteria. The base option determines /// the primary filtering mode, while the selection options provide additional constraints. public struct ListSelectOptions: Hashable, Sendable { @@ -90,14 +90,14 @@ public struct ListSelectOptions: Hashable, Sendable { /// Additional selection criteria to apply. /// /// These options further constrain which mailboxes are returned. Multiple options - /// can be combined (e.g., both ``ListSelectOption/remote`` and ``ListSelectOption/specialUse`` + /// can be combined (for example, both ``ListSelectOption/remote`` and ``ListSelectOption/specialUse`` /// to get remote special-use mailboxes). public var options: [ListSelectOption] /// Creates a new combination of `LIST` selection options. /// /// - Parameters: - /// - baseOption: The base selection mode (e.g., ``ListSelectBaseOption/subscribed``) + /// - baseOption: The base selection mode (for example, ``ListSelectBaseOption/subscribed``) /// - options: Additional selection criteria to apply public init(baseOption: ListSelectBaseOption, options: [ListSelectOption]) { self.baseOption = baseOption diff --git a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxAttribute.swift b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxAttribute.swift index fdfa57e7..09178092 100644 --- a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxAttribute.swift +++ b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxAttribute.swift @@ -36,19 +36,19 @@ import struct NIO.ByteBuffer public enum MailboxAttribute: String, CaseIterable, Sendable { /// The `MESSAGES` attribute: the number of messages in the mailbox. /// - /// This attribute returns the total count of messages in the mailbox. + /// Returns the total count of messages in the mailbox. /// See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). case messageCount = "MESSAGES" /// The `RECENT` attribute: the number of messages with the `\Recent` flag. /// - /// This attribute returns the count of messages that have been added to the mailbox since + /// Returns the count of messages that have been added to the mailbox since /// the last time it was selected. See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). case recentCount = "RECENT" /// The `UIDNEXT` attribute: the next unique identifier value. /// - /// This attribute predicts the UID value that will be assigned to the next message appended + /// Predicts the UID value that will be assigned to the next message appended /// to the mailbox. See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). case uidNext = "UIDNEXT" @@ -60,20 +60,20 @@ public enum MailboxAttribute: String, CaseIterable, Sendable { /// The `UNSEEN` attribute: the number of messages without the `\Seen` flag. /// - /// This attribute returns the count of messages in the mailbox that do not have the `\Seen` flag set. + /// Returns the count of messages in the mailbox that do not have the `\Seen` flag set. /// See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). case unseenCount = "UNSEEN" /// The `SIZE` attribute: the total size of the mailbox in octets. /// - /// This attribute returns the total size of all messages in the mailbox in bytes (octets). + /// Returns the total size of all messages in the mailbox in bytes (octets). /// **Requires server capability:** ``Capability/status(_:)`` with ``Capability/StatusKind/size`` /// See [RFC 8438](https://datatracker.ietf.org/doc/html/rfc8438). case size = "SIZE" /// The `HIGHESTMODSEQ` attribute: the highest modification sequence value. /// - /// This attribute returns the highest mod-sequence value assigned to any message in the mailbox. + /// Returns the highest mod-sequence value assigned to any message in the mailbox. /// The `CONDSTORE` extension uses modification sequences to track message changes. /// **Requires server capability:** ``Capability/condStore`` /// See [RFC 7162 Section 3.1](https://datatracker.ietf.org/doc/html/rfc7162#section-3.1). @@ -81,14 +81,14 @@ public enum MailboxAttribute: String, CaseIterable, Sendable { /// The `APPENDLIMIT` attribute: the maximum message upload size in octets. /// - /// This attribute specifies the maximum size (in bytes) of a single message that can be appended to the mailbox. + /// Specifies the maximum size (in bytes) of a single message that can be appended to the mailbox. /// **Requires server capability:** ``Capability/mailboxSpecificAppendLimit`` or ``Capability/appendLimit(_:)`` /// See [RFC 7889 Section 4](https://datatracker.ietf.org/doc/html/rfc7889#section-4). case appendLimit = "APPENDLIMIT" /// The `MAILBOXID` attribute: the server's object identifier for the mailbox. /// - /// This attribute returns a permanent, server-assigned identifier that uniquely identifies the mailbox. + /// Returns a permanent, server-assigned identifier that uniquely identifies the mailbox. /// Unlike `UIDVALIDITY`, this identifier is globally unique and never reused. /// **Requires server capability:** ``Capability/objectID`` /// See [RFC 8474 Section 3](https://datatracker.ietf.org/doc/html/rfc8474#section-3). @@ -119,19 +119,19 @@ public enum MailboxAttribute: String, CaseIterable, Sendable { public struct MailboxStatus: Hashable, Sendable { /// The `MESSAGES` attribute: total number of messages in the mailbox. /// - /// This property is `nil` if the `MESSAGES` attribute was not requested or returned. + /// `nil` if the `MESSAGES` attribute was not requested or returned. /// See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). public var messageCount: Int? /// The `RECENT` attribute: number of messages with the `\Recent` flag. /// - /// This property is `nil` if the `RECENT` attribute was not requested or returned. + /// `nil` if the `RECENT` attribute was not requested or returned. /// See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). public var recentCount: Int? /// The `UIDNEXT` attribute: the next unique identifier value to be assigned. /// - /// This property is `nil` if the `UIDNEXT` attribute was not requested or returned. + /// `nil` if the `UIDNEXT` attribute was not requested or returned. /// See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). public var nextUID: UID? @@ -145,20 +145,20 @@ public struct MailboxStatus: Hashable, Sendable { /// The `UNSEEN` attribute: number of messages without the `\Seen` flag. /// - /// This property is `nil` if the `UNSEEN` attribute was not requested or returned. + /// `nil` if the `UNSEEN` attribute was not requested or returned. /// See [RFC 3501 Section 7.3.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.3.2). public var unseenCount: Int? /// The `SIZE` attribute: total size of the mailbox in bytes (octets). /// - /// This property is `nil` if the `SIZE` attribute was not requested or returned. + /// `nil` if the `SIZE` attribute was not requested or returned. /// **Requires server capability:** ``Capability/status(_:)`` with ``Capability/StatusKind/size`` /// See [RFC 8438](https://datatracker.ietf.org/doc/html/rfc8438). public var size: Int? /// The `HIGHESTMODSEQ` attribute: the highest modification sequence value assigned to any message. /// - /// This property is `nil` if the `HIGHESTMODSEQ` attribute was not requested or returned. + /// `nil` if the `HIGHESTMODSEQ` attribute was not requested or returned. /// The `CONDSTORE` extension uses modification sequences to track which messages have changed. /// **Requires server capability:** ``Capability/condStore`` /// See [RFC 7162 Section 3.1](https://datatracker.ietf.org/doc/html/rfc7162#section-3.1). @@ -166,7 +166,7 @@ public struct MailboxStatus: Hashable, Sendable { /// The `APPENDLIMIT` attribute: maximum size per message in bytes (octets). /// - /// This property is `nil` if the `APPENDLIMIT` attribute was not requested or returned. + /// `nil` if the `APPENDLIMIT` attribute was not requested or returned. /// The `APPENDLIMIT` extension specifies per-mailbox upload limits. /// **Requires server capability:** ``Capability/mailboxSpecificAppendLimit`` or ``Capability/appendLimit(_:)`` /// See [RFC 7889 Section 4](https://datatracker.ietf.org/doc/html/rfc7889#section-4). @@ -174,7 +174,7 @@ public struct MailboxStatus: Hashable, Sendable { /// The `MAILBOXID` attribute: the server's permanent object identifier for the mailbox. /// - /// This property is `nil` if the `MAILBOXID` attribute was not requested or returned. + /// `nil` if the `MAILBOXID` attribute was not requested or returned. /// The `OBJECTID` extension assigns stable, unique identifiers to mailboxes that persist /// even if the mailbox is renamed or moved. /// **Requires server capability:** ``Capability/objectID`` diff --git a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxData.swift b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxData.swift index 2cc1d23e..1c5c62c8 100644 --- a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxData.swift +++ b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxData.swift @@ -17,7 +17,7 @@ import struct NIO.ByteBuffer /// Untagged response data from the server about mailboxes, messages, or search results. /// /// Servers send untagged responses (prefixed with `*`) that convey information about mailboxes, messages, and operation results. -/// This enum represents the various types of mailbox-related untagged data that a server can send. +/// Represents the various types of mailbox-related untagged data that a server can send. /// /// These responses are typically encountered as the data within ``Response`` untagged responses, which may /// be wrapped in ``ResponsePayload/mailboxData(_:)``. diff --git a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxGroup.swift b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxGroup.swift index 91b53c30..b69945fe 100644 --- a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxGroup.swift +++ b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxGroup.swift @@ -43,18 +43,18 @@ import struct NIO.ByteBuffer public struct EmailAddressGroup: Hashable, Sendable { /// The name of the address group. /// - /// This is the human-readable name for the collection of addresses, such as "Family" or "Work Team". + /// The human-readable name for the collection of addresses, such as "Family" or "Work Team". public var groupName: ByteBuffer /// The optional source root for the address group. /// - /// This field may contain additional routing information for the group. + /// May contain additional routing information for the group. /// Per [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322), this is typically `nil`. public var sourceRoot: ByteBuffer? /// The nested addresses and groups within this group. /// - /// This list can contain both individual addresses (``EmailAddressListElement/singleAddress(_:)``) + /// Can contain both individual addresses (``EmailAddressListElement/singleAddress(_:)``) /// and nested address groups (``EmailAddressListElement/group(_:)``), allowing for arbitrarily /// deep hierarchies. public var children: [EmailAddressListElement] @@ -78,7 +78,7 @@ public struct EmailAddressGroup: Hashable, Sendable { /// the ENVELOPE structure includes address lists (such as `To:`, `From:`, `Cc:`) that may contain /// both individual email addresses and named address groups. /// -/// This is an indirect enum, allowing arbitrarily deep nesting of groups within groups. +/// An indirect enum, allowing arbitrarily deep nesting of groups within groups. /// /// ### Example /// @@ -101,12 +101,12 @@ public struct EmailAddressGroup: Hashable, Sendable { public indirect enum EmailAddressListElement: Hashable, Sendable { /// A single email address with no children. /// - /// This case wraps a single ``EmailAddress`` in the address list. + /// Wraps a single ``EmailAddress`` in the address list. case singleAddress(EmailAddress) /// A collection of addresses organized under a group name. /// - /// This case wraps an ``EmailAddressGroup`` containing a group name and nested + /// Wraps an ``EmailAddressGroup`` containing a group name and nested /// ``EmailAddressListElement`` children (which can themselves be addresses or groups). case group(EmailAddressGroup) } diff --git a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxInfo.swift b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxInfo.swift index 3fcd2c2d..c81214da 100644 --- a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxInfo.swift +++ b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxInfo.swift @@ -92,7 +92,7 @@ extension MailboxInfo { public struct Attribute: Hashable, Sendable { /// The mailbox cannot be selected with a `SELECT` command. /// - /// This attribute indicates that the mailbox exists but is not selectable. + /// Indicates that the mailbox exists but is not selectable. /// A common example is a mailbox used only to contain child mailboxes. /// See [RFC 3501 Section 7.2.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.2.2). public static var noSelect: Self { Self(#"\Noselect"#) } @@ -157,7 +157,7 @@ extension MailboxInfo { /// or create custom attributes for extension or server-specific attributes. /// Attribute names are case-insensitive per the IMAP specification. /// - /// - Parameter str: The attribute name, typically starting with backslash (e.g., "\\Noselect") + /// - Parameter str: The attribute name, typically starting with backslash (for example, "\\Noselect") public init(_ str: String) { self.backing = str } diff --git a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxName.swift b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxName.swift index c69cb9a0..fa14f8ff 100644 --- a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxName.swift +++ b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxName.swift @@ -29,7 +29,7 @@ public struct MailboxTooBigError: Error, Equatable { /// A mailbox name contained invalid characters or violated naming constraints. /// -/// This error is raised when a mailbox name contains characters that are not permitted by the IMAP protocol, +/// Raised when a mailbox name contains characters that are not permitted by the IMAP protocol, /// such as path separators in the display name. public struct InvalidMailboxNameError: Error, Equatable { /// A description of why the mailbox name was considered invalid. @@ -73,7 +73,7 @@ public struct InvalidPathSeparatorError: Error, Equatable { public struct MailboxPath: Hashable, Sendable { /// The full mailbox path in Modified UTF-7 encoding. /// - /// This name may contain path separator characters and represents the complete hierarchical path + /// May contain path separator characters and represents the complete hierarchical path /// to the mailbox as known to the server. The encoding follows /// [RFC 2152](https://datatracker.ietf.org/doc/html/rfc2152) as required by RFC 3501. public let name: MailboxName @@ -99,7 +99,7 @@ public struct MailboxPath: Hashable, Sendable { /// Creates a new `MailboxPath` with the given name and optional path separator. /// - /// This initializer accepts raw bytes and does not perform encoding. Use ``makeRootMailbox(displayName:pathSeparator:)`` + /// Accepts raw bytes and does not perform encoding. Use ``makeRootMailbox(displayName:pathSeparator:)`` /// to create a new mailbox from a display string with automatic encoding, or ``makeSubMailbox(displayName:)`` /// to create a hierarchical mailbox path. /// @@ -146,7 +146,7 @@ extension MailboxPath { /// Splits the mailbox path into human-readable display components using the path separator. /// - /// This method converts the Modified UTF-7-encoded mailbox name to a display string by splitting on + /// Converts the Modified UTF-7-encoded mailbox name to a display string by splitting on /// the path separator. The conversion is lossy and intended for display purposes only. Do not use the /// returned components as mailbox names for protocol operations. /// @@ -172,7 +172,7 @@ extension MailboxPath { /// Creates a new root mailbox path from a display name. /// - /// This factory method encodes the display name using Modified UTF-7 (RFC 2152) and validates + /// Encodes the display name using Modified UTF-7 (RFC 2152) and validates /// that the resulting mailbox name does not contain the path separator character (if provided). /// Root mailboxes are top-level mailboxes with no parent hierarchy. /// @@ -202,7 +202,7 @@ extension MailboxPath { /// Creates a nested child mailbox path within this mailbox. /// - /// This method encodes the display name using Modified UTF-7 and appends it as a child to the current + /// Encodes the display name using Modified UTF-7 and appends it as a child to the current /// mailbox path. The path separator is inserted between the parent and child names. /// /// **Important:** This method should only be used when creating new mailboxes that do not yet exist diff --git a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxPatterns.swift b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxPatterns.swift index 149bbed1..e5d6cf2c 100644 --- a/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxPatterns.swift +++ b/Sources/NIOIMAPCore/Grammar/Mailbox/MailboxPatterns.swift @@ -26,7 +26,7 @@ import struct NIO.ByteBuffer /// - `*` - matches any sequence of zero or more characters, including the hierarchy delimiter /// /// To list **all mailboxes** on the server, use the pattern `*` (the wildcard that matches everything). -/// This is the most common LIST usage and returns the complete mailbox hierarchy. +/// Using `*` is the most common LIST usage and returns the complete mailbox hierarchy. /// /// ### Example /// @@ -41,7 +41,7 @@ import struct NIO.ByteBuffer /// LIST request, and the server returns matching mailboxes wrapped as ``Response/untagged(_:)`` /// containing ``ResponsePayload/mailboxData(_:)`` entries for each match. /// -/// ### Listing All Mailboxes +/// ### Listing all mailboxes /// /// ``` /// C: A001 LIST "" "*" diff --git a/Sources/NIOIMAPCore/Grammar/MailboxUIDValidity.swift b/Sources/NIOIMAPCore/Grammar/MailboxUIDValidity.swift index fa36bf08..af0cd529 100644 --- a/Sources/NIOIMAPCore/Grammar/MailboxUIDValidity.swift +++ b/Sources/NIOIMAPCore/Grammar/MailboxUIDValidity.swift @@ -16,10 +16,10 @@ /// /// In IMAP URLs, a mailbox is identified by its percent-encoded name and an optional UID validity value. /// The UID validity (``UIDValidity``) is a server-assigned value that helps detect when messages in a -/// mailbox have been invalidated (e.g., after a mailbox has been deleted and recreated). +/// mailbox have been invalidated (for example, after a mailbox has been deleted and recreated). /// Including the UID validity in a URL helps ensure the URL is not referencing stale or invalid message UIDs. /// -/// This type combines a ``EncodedMailbox`` and optional ``UIDValidity`` to create a complete mailbox +/// Combines a ``EncodedMailbox`` and optional ``UIDValidity`` to create a complete mailbox /// reference for use in ``MessagePath`` structures. It forms the core of IMAP URL mailbox addressing. /// /// ### Examples @@ -40,7 +40,7 @@ /// S: * GENURLAUTH "imap://user@example.com/INBOX/;uidvalidity=4294967295/;uid=20;urlauth=anonymous:internal:..." /// ``` /// -/// ## Related Types +/// ## Related types /// /// See ``MessagePath`` for the complete message location (mailbox reference, UID, optional section, optional byte range), /// ``UIDValidity`` for UID validity value details, and ``NetworkMessagePath`` for the full network-accessible URL. diff --git a/Sources/NIOIMAPCore/Grammar/MechanismBase64.swift b/Sources/NIOIMAPCore/Grammar/MechanismBase64.swift index 56bb6ed5..b570b239 100644 --- a/Sources/NIOIMAPCore/Grammar/MechanismBase64.swift +++ b/Sources/NIOIMAPCore/Grammar/MechanismBase64.swift @@ -16,7 +16,7 @@ import struct NIO.ByteBuffer /// An authorization mechanism paired with base64-encoded authentication data. /// -/// This type is used in URLAUTH contexts (RFC 4467) to specify both the mechanism used to +/// Used in URLAUTH contexts (RFC 4467) to specify both the mechanism used to /// generate authorization credentials and the base64-encoded credentials themselves. /// /// - SeeAlso: [RFC 4467 IMAP4 Capabilities for SMTP and SUBMIT](https://datatracker.ietf.org/doc/html/rfc4467) diff --git a/Sources/NIOIMAPCore/Grammar/Media/Media.swift b/Sources/NIOIMAPCore/Grammar/Media/Media.swift index f663d9ed..e13c29f0 100644 --- a/Sources/NIOIMAPCore/Grammar/Media/Media.swift +++ b/Sources/NIOIMAPCore/Grammar/Media/Media.swift @@ -14,15 +14,15 @@ /// Namespace grouping MIME media type related types. /// -/// This namespace organizes MIME media type components as defined in [RFC 2045](https://datatracker.ietf.org/doc/html/rfc2045). +/// Organizes MIME media type components as defined in [RFC 2045](https://datatracker.ietf.org/doc/html/rfc2045). public enum Media {} extension Media { /// A MIME media type consisting of a top-level type and subtype. /// /// MIME media types (also called MIME types or content types) identify the format of message part content. - /// Each media type is composed of a top-level type (e.g., `text`, `image`, `application`) and a subtype - /// (e.g., `plain`, `html`, `jpeg`), separated by a slash in standard notation (e.g., `text/plain`). + /// Each media type is composed of a top-level type (for example, `text`, `image`, or `application`) and a subtype + /// (for example, `plain`, `html`, or `jpeg`), separated by a slash in standard notation (for example, `text/plain`). /// /// Media types are defined in [RFC 2045 Section 5](https://datatracker.ietf.org/doc/html/rfc2045#section-5) and /// are included in message body structures retrieved via the `BODYSTRUCTURE` FETCH attribute. @@ -41,10 +41,10 @@ extension Media { /// - SeeAlso: ``TopLevelType`` /// - SeeAlso: ``Subtype`` public struct MediaType: Hashable, Sendable { - /// The top-level type component (e.g., `text`, `image`, `application`). + /// The top-level type component (for example, `text`, `image`, or `application`). public var topLevel: TopLevelType - /// The subtype component (e.g., `plain`, `html`, `jpeg`). + /// The subtype component (for example, `plain`, `html`, or `jpeg`). public var sub: Subtype /// Creates a media type from top-level type and subtype components. @@ -61,11 +61,11 @@ extension Media { extension Media.MediaType { /// Creates a media type from string components. /// - /// This is a convenience initializer that creates ``TopLevelType`` and ``Subtype`` instances + /// A convenience initializer that creates ``TopLevelType`` and ``Subtype`` instances /// from the provided strings, which are automatically lowercased. /// - /// - parameter topLevel: The top-level type as a string (e.g., `"text"`, `"image"`). - /// - parameter sub: The subtype as a string (e.g., `"plain"`, `"html"`). + /// - parameter topLevel: The top-level type as a string (for example, `"text"` or `"image"`). + /// - parameter sub: The subtype as a string (for example, `"plain"` or `"html"`). public init(topLevel: String, sub: String) { self.topLevel = Media.TopLevelType(topLevel) self.sub = Media.Subtype(sub) @@ -77,7 +77,7 @@ extension Media.MediaType { extension Media { /// The top-level type component of a MIME media type. /// - /// The top-level type is the first component of a media type (e.g., `text` in `text/plain`). + /// The top-level type is the first component of a media type (for example, `text` in `text/plain`). /// Standard top-level types are registered with IANA and are case-insensitive, normalized to lowercase. /// /// Defined in [RFC 2045 Section 5](https://datatracker.ietf.org/doc/html/rfc2045#section-5) with types @@ -130,7 +130,7 @@ extension Media { /// The top-level type as a lowercase string. /// - /// - Returns: The type name in lowercase (e.g., `"text"`, `"image"`, `"multipart"`). + /// - Returns: The type name in lowercase (for example, `"text"`, `"image"`, or `"multipart"`). public var debugDescription: String { self.stringValue } @@ -140,7 +140,7 @@ extension Media { /// The provided string is automatically lowercased to normalize the type value. This allows /// case-insensitive comparison between type values. /// - /// - parameter stringValue: The type name as a string (e.g., `"TEXT"`, `"Image"`, `"text"`). Will be lowercased. + /// - parameter stringValue: The type name as a string (for example, `"TEXT"`, `"Image"`, or `"text"`). Will be lowercased. public init(_ stringValue: String) { self.stringValue = stringValue.lowercased() } @@ -150,10 +150,10 @@ extension Media { extension Media.TopLevelType: ExpressibleByStringLiteral { /// Creates a top-level type from a string literal. /// - /// This allows direct initialization like `let topLevel: Media.TopLevelType = "text"`. + /// Allows direct initialization like `let topLevel: Media.TopLevelType = "text"`. /// The string literal is automatically lowercased. /// - /// - parameter stringLiteral: The type name as a string literal (e.g., `"text"`, `"image"`). + /// - parameter stringLiteral: The type name as a string literal (for example, `"text"` or `"image"`). public init(stringLiteral: String) { self.init(stringLiteral) } @@ -173,7 +173,7 @@ extension String { extension Media { /// The subtype component of a MIME media type. /// - /// The subtype is the second component of a media type (e.g., `plain` in `text/plain`). + /// The subtype is the second component of a media type (for example, `plain` in `text/plain`). /// Subtypes are case-insensitive, normalized to lowercase, and are specific to their top-level type. /// /// Defined in [RFC 2045](https://datatracker.ietf.org/doc/html/rfc2045) with subtypes registered at @@ -186,20 +186,20 @@ extension Media { /// Clients should display the most appropriate alternative according to user preferences. public static let alternative = Self("alternative") - /// The `multipart/related` subtype, specifying related body parts (e.g., HTML with embedded images). + /// The `multipart/related` subtype, specifying related body parts (for example, HTML with embedded images). /// - /// Parts in a multipart/related message are typically related to one another (e.g., an HTML + /// Parts in a multipart/related message are typically related to one another (for example, an HTML /// document with embedded images or stylesheets). public static let related = Self("related") /// The `multipart/mixed` subtype, specifying a generic set of mixed data types. /// - /// This is the default multipart subtype for messages with multiple unrelated parts. + /// The default multipart subtype for messages with multiple unrelated parts. public static let mixed = Self("mixed") /// The `message/rfc822` subtype for encapsulated email messages. /// - /// This subtype indicates the message part contains a complete RFC 822 (email) message, + /// Indicates the message part contains a complete RFC 822 (email) message, /// which may have its own headers, body structure, and attachments. public static let rfc822 = Self("rfc822") @@ -208,7 +208,7 @@ extension Media { /// The subtype as a lowercase string. /// - /// - Returns: The subtype name in lowercase (e.g., `"plain"`, `"html"`, `"mixed"`). + /// - Returns: The subtype name in lowercase (for example, `"plain"`, `"html"`, or `"mixed"`). public var debugDescription: String { self.stringValue } /// Creates a subtype from a string. @@ -216,7 +216,7 @@ extension Media { /// The provided string is automatically lowercased to normalize the subtype value. This allows /// case-insensitive comparison between subtype values. /// - /// - parameter stringValue: The subtype name as a string (e.g., `"PLAIN"`, `"Html"`, `"plain"`). Will be lowercased. + /// - parameter stringValue: The subtype name as a string (for example, `"PLAIN"`, `"Html"`, or `"plain"`). Will be lowercased. public init(_ stringValue: String) { self.stringValue = stringValue.lowercased() } @@ -226,10 +226,10 @@ extension Media { extension Media.Subtype: ExpressibleByStringLiteral { /// Creates a subtype from a string literal. /// - /// This allows direct initialization like `let subtype: Media.Subtype = "plain"`. + /// Allows direct initialization like `let subtype: Media.Subtype = "plain"`. /// The string literal is automatically lowercased. /// - /// - parameter stringLiteral: The subtype name as a string literal (e.g., `"plain"`, `"html"`). + /// - parameter stringLiteral: The subtype name as a string literal (for example, `"plain"` or `"html"`). public init(stringLiteral: String) { self.init(stringLiteral) } diff --git a/Sources/NIOIMAPCore/Grammar/Message/EmailID.swift b/Sources/NIOIMAPCore/Grammar/Message/EmailID.swift index 08599042..20d900cd 100644 --- a/Sources/NIOIMAPCore/Grammar/Message/EmailID.swift +++ b/Sources/NIOIMAPCore/Grammar/Message/EmailID.swift @@ -37,7 +37,7 @@ /// for this message. If copied to another mailbox, the copied message will receive the same /// `EMAILID`, allowing clients to recognize the messages as identical content. /// -/// ## Related Proprietary Identifiers +/// ## Related proprietary identifiers /// /// Gmail servers provide a similar but proprietary identifier via the `X-GM-MSGID` field (see /// ``FetchAttribute/gmailMessageID``). While both serve similar purposes, `EMAILID` is diff --git a/Sources/NIOIMAPCore/Grammar/Message/GmailLabel.swift b/Sources/NIOIMAPCore/Grammar/Message/GmailLabel.swift index cac68690..28f5afd2 100644 --- a/Sources/NIOIMAPCore/Grammar/Message/GmailLabel.swift +++ b/Sources/NIOIMAPCore/Grammar/Message/GmailLabel.swift @@ -19,7 +19,7 @@ import struct NIO.ByteBuffer /// in the X-GM-LABELS attribute of a FETCH response. Labels are stored as byte buffers and may be /// encoded in modified UTF-7 format (the same encoding used for mailbox names). /// -/// This is a Gmail-specific extension not part of the standard IMAP protocol. It is available when +/// A Gmail-specific extension not part of the standard IMAP protocol. It is available when /// the server advertises the X-GM-EXT-1 capability. /// /// ### Example @@ -29,7 +29,7 @@ import struct NIO.ByteBuffer /// S: * 1 FETCH (X-GM-LABELS ("Important" "Work")) /// ``` /// -/// This response indicates message 1 has two labels: "Important" and "Work". +/// The response indicates message 1 has two labels: "Important" and "Work". /// /// - SeeAlso: [Gmail IMAP Extensions](https://developers.google.com/gmail/imap/imap-extensions) /// - SeeAlso: ``MessageAttribute/gmailLabels(_:)`` diff --git a/Sources/NIOIMAPCore/Grammar/Message/MessageAttributes.swift b/Sources/NIOIMAPCore/Grammar/Message/MessageAttributes.swift index 916b86ec..3e7352ae 100644 --- a/Sources/NIOIMAPCore/Grammar/Message/MessageAttributes.swift +++ b/Sources/NIOIMAPCore/Grammar/Message/MessageAttributes.swift @@ -30,13 +30,13 @@ import struct NIO.ByteBuffer /// The response line contains three attributes: ``flags(_:)`` wrapping `\Seen`, ``envelope(_:)`` containing the message envelope, /// and ``uid(_:)`` with UID `123`. /// -/// ## Request vs Response +/// ## Request versus response /// /// Use ``FetchAttribute`` to request specific message attributes in a `FETCH` command. The server responds with ``MessageAttribute`` /// values containing the requested data. Not all ``FetchAttribute`` cases have corresponding ``MessageAttribute`` cases — for example, /// ``FetchAttribute/bodyStructure(extensions:)`` (a request) produces ``body(_:hasExtensionData:)`` (response). /// -/// ## Related Types +/// ## Related types /// /// - ``FetchAttribute`` — Request side (what the client asks for) /// - ``FetchModifier`` — Modifiers for `FETCH` commands (RFC 7162) @@ -56,7 +56,7 @@ public enum MessageAttribute: Hashable, Sendable { /// S: * 1 FETCH (FLAGS (\Seen \Flagged)) /// ``` /// - /// This response contains the ``flags(_:)`` case with two system flags. + /// The response contains the ``flags(_:)`` case with two system flags. /// /// - SeeAlso: [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2) case flags([Flag]) @@ -149,7 +149,7 @@ public enum MessageAttribute: Hashable, Sendable { /// S: * 1 FETCH (BINARY.SIZE[2] 5000) /// ``` /// - /// This indicates body part 2 has 5000 octets when decoded. + /// Indicates body part 2 has 5000 octets when decoded. /// /// - SeeAlso: [RFC 3516 IMAP4 Binary Content Extension](https://datatracker.ietf.org/doc/html/rfc3516) case binarySize(section: SectionSpecifier.Part, size: Int) @@ -166,7 +166,7 @@ public enum MessageAttribute: Hashable, Sendable { /// S: * 1 FETCH (BODY[4.TEXT] NIL) /// ``` /// - /// This indicates that body part 4 has no TEXT section (it doesn’t exist). + /// Indicates that body part 4 has no TEXT section (it doesn’t exist). /// /// - SeeAlso: [RFC 3501 Section 7.4.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.2) case nilBody(StreamingKind) @@ -174,7 +174,7 @@ public enum MessageAttribute: Hashable, Sendable { /// The modification sequence number for the message. /// /// The `MODSEQ` attribute contains a modification sequence number indicating when the message or its flags last changed. - /// This is used with the `CONDSTORE` extension for efficient synchronization. + /// Used with the `CONDSTORE` extension for efficient synchronization. /// /// - SeeAlso: [RFC 7162 IMAP4 Extensions: CONDSTORE and QRESYNC](https://datatracker.ietf.org/doc/html/rfc7162) case fetchModificationSequence(ModificationSequenceValue) @@ -182,7 +182,7 @@ public enum MessageAttribute: Hashable, Sendable { /// Gmail-specific message unique identifier (vendor extension). /// /// The `X-GM-MSGID` attribute contains a Gmail-specific unique message ID that remains stable across mailboxes. - /// This is a 64-bit unsigned integer. This is a Gmail-only extension, not part of the standard IMAP protocol. + /// A 64-bit unsigned integer and Gmail-only extension, not part of the standard IMAP protocol. /// /// For standard IMAP object identifiers, see ``emailID(_:)`` which uses RFC 8474. /// @@ -192,7 +192,7 @@ public enum MessageAttribute: Hashable, Sendable { /// Gmail-specific thread identifier (vendor extension). /// /// The `X-GM-THRID` attribute contains a Gmail-specific thread ID that associates messages belonging to the same thread. - /// This is a 64-bit unsigned integer. This is a Gmail-only extension, not part of the standard IMAP protocol. + /// A 64-bit unsigned integer and Gmail-only extension, not part of the standard IMAP protocol. /// /// For standard IMAP object identifiers, see ``threadID(_:)`` which uses RFC 8474. /// @@ -202,7 +202,7 @@ public enum MessageAttribute: Hashable, Sendable { /// Gmail-specific message labels (vendor extension). /// /// The `X-GM-LABELS` attribute contains a list of labels (tags) applied to the message in Gmail. Each label is a ``GmailLabel``. - /// This is a Gmail-only extension, not part of the standard IMAP protocol. + /// A Gmail-only extension, not part of the standard IMAP protocol. /// /// - SeeAlso: [Gmail IMAP Extensions](https://developers.google.com/gmail/imap/imap-extensions) case gmailLabels([GmailLabel]) @@ -219,7 +219,7 @@ public enum MessageAttribute: Hashable, Sendable { /// An object identifier for the message content. /// /// The `EMAILID` attribute contains an object identifier that uniquely identifies the message’s content. - /// This is stable across servers and can be used to detect when a message with the same content exists + /// Stable across servers and can be used to detect when a message with the same content exists /// in different mailboxes or on different servers. /// /// For Gmail-specific message identifiers, see ``gmailMessageID(_:)`` which uses the `X-GM-MSGID` extension. @@ -230,7 +230,7 @@ public enum MessageAttribute: Hashable, Sendable { /// An object identifier for the message thread. /// /// The `THREADID` attribute contains an object identifier for the thread the message belongs to. - /// This is `nil` if the message is not part of a thread or if the server does not support threading. + /// `nil` if the message is not part of a thread or if the server does not support threading. /// /// For Gmail-specific thread identifiers, see ``gmailThreadID(_:)`` which uses the `X-GM-THRID` extension. /// diff --git a/Sources/NIOIMAPCore/Grammar/Message/MessageData.swift b/Sources/NIOIMAPCore/Grammar/Message/MessageData.swift index 4d70c0c2..ab273ba8 100644 --- a/Sources/NIOIMAPCore/Grammar/Message/MessageData.swift +++ b/Sources/NIOIMAPCore/Grammar/Message/MessageData.swift @@ -40,7 +40,7 @@ public enum MessageData: Hashable, Sendable { /// /// The EXPUNGE response indicates that the message at the specified sequence number /// no longer exists. Clients must renumber remaining messages accordingly. - /// This response is not sent for UID-based commands. + /// Not sent for UID-based commands. /// /// - SeeAlso: [RFC 3501 Section 7.4.1 EXPUNGE](https://datatracker.ietf.org/doc/html/rfc3501#section-7.4.1) case expunge(SequenceNumber) diff --git a/Sources/NIOIMAPCore/Grammar/Message/ThreadID.swift b/Sources/NIOIMAPCore/Grammar/Message/ThreadID.swift index 335e636e..e39202a5 100644 --- a/Sources/NIOIMAPCore/Grammar/Message/ThreadID.swift +++ b/Sources/NIOIMAPCore/Grammar/Message/ThreadID.swift @@ -42,7 +42,7 @@ /// Messages 1 and 2 have the same `THREADID (abc123def456)`, indicating they are related. /// Message 3 has a different `THREADID (xyz789abc123)`, indicating it belongs to a different thread. /// -/// ## Related Proprietary Identifiers +/// ## Related proprietary identifiers /// /// Gmail servers provide a similar but proprietary identifier via the `X-GM-THRID` field (see /// ``FetchAttribute/gmailThreadID``). While both serve similar purposes, `THREADID` is diff --git a/Sources/NIOIMAPCore/Grammar/MessageID.swift b/Sources/NIOIMAPCore/Grammar/MessageID.swift index f58a9a70..6dabf2f1 100644 --- a/Sources/NIOIMAPCore/Grammar/MessageID.swift +++ b/Sources/NIOIMAPCore/Grammar/MessageID.swift @@ -18,7 +18,7 @@ /// formatted as angle-bracketed text, for example . The Message-ID /// appears in the In-Reply-To header and is used to correlate related messages in threads. /// -/// This type wraps the raw string value including angle brackets as sent by the server. +/// Wraps the raw string value including angle brackets as sent by the server. /// /// ### Example /// diff --git a/Sources/NIOIMAPCore/Grammar/MessagePath.swift b/Sources/NIOIMAPCore/Grammar/MessagePath.swift index f1cf1218..364e7d1c 100644 --- a/Sources/NIOIMAPCore/Grammar/MessagePath.swift +++ b/Sources/NIOIMAPCore/Grammar/MessagePath.swift @@ -23,7 +23,7 @@ /// - **URLAUTH URLs**: `imap://server/mailbox/;uidvalidity=V/;uid=N;urlauth=...` /// - **CATENATE operations**: Reference existing messages when composing new messages (RFC 4469) /// -/// ### Message Path Components +/// ### Message path components /// /// 1. **Mailbox Reference** (``MailboxUIDValidity``): Identifies the mailbox with optional UID validity /// 2. **Message UID** (``IUID``): The message unique identifier @@ -53,7 +53,7 @@ /// S: * GENURLAUTH "imap://user@example.com/INBOX/;uidvalidity=4294967295/;uid=20;urlauth=anonymous:internal:..." /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``MailboxUIDValidity`` provides the mailbox reference /// - ``IUID`` wraps the message unique identifier @@ -74,7 +74,7 @@ public struct MessagePath: Hashable, Sendable { /// The unique identifier of the message within the mailbox. public var iUID: IUID - /// Optional section of the message (e.g., "1", "2.MIME", "TEXT"). + /// Optional section of the message (for example, "1", "2.MIME", or "TEXT"). /// /// When `nil`, refers to the entire message. When specified, refers to a specific /// part or substructure of the message. diff --git a/Sources/NIOIMAPCore/Grammar/Metadata/MetadataEntryName.swift b/Sources/NIOIMAPCore/Grammar/Metadata/MetadataEntryName.swift index ed05d1cd..2a3f1b82 100644 --- a/Sources/NIOIMAPCore/Grammar/Metadata/MetadataEntryName.swift +++ b/Sources/NIOIMAPCore/Grammar/Metadata/MetadataEntryName.swift @@ -35,7 +35,7 @@ import NIO /// in the ``MetadataResponse/values(values:mailbox:)`` response. They appear in ``Response/untagged(_:)`` /// containing ``ResponsePayload/metadata(_:)``. /// -/// ## Related Types +/// ## Related types /// /// - See ``MetadataValue`` for metadata entry values /// - See ``MetadataResponse`` for complete metadata responses @@ -54,7 +54,7 @@ public struct MetadataEntryName: Hashable, Sendable { /// Creates a `MetadataEntryName` from a `String`. /// - /// - parameter string: The entry name as a string (e.g., `"/shared/comment"`, `"/private/notes"`). + /// - parameter string: The entry name as a string (for example, `"/shared/comment"` or `"/private/notes"`). public init(_ string: String) { self.backing = ByteBuffer(string: string) } diff --git a/Sources/NIOIMAPCore/Grammar/MetadataOption.swift b/Sources/NIOIMAPCore/Grammar/MetadataOption.swift index de1147e1..58caceb2 100644 --- a/Sources/NIOIMAPCore/Grammar/MetadataOption.swift +++ b/Sources/NIOIMAPCore/Grammar/MetadataOption.swift @@ -31,7 +31,7 @@ /// The options `(MAXSIZE 1024 DEPTH 1)` are ``MetadataOption`` values that limit results to entries /// with a maximum size of 1024 bytes and restrict the search to a depth of 1 level. /// -/// ## Related Types +/// ## Related types /// /// - See ``MetadataEntryName`` for metadata entry names /// - See ``MetadataValue`` for metadata entry values diff --git a/Sources/NIOIMAPCore/Grammar/MetadataResponse.swift b/Sources/NIOIMAPCore/Grammar/MetadataResponse.swift index 229f87bc..9e997759 100644 --- a/Sources/NIOIMAPCore/Grammar/MetadataResponse.swift +++ b/Sources/NIOIMAPCore/Grammar/MetadataResponse.swift @@ -35,7 +35,7 @@ import struct OrderedCollections.OrderedDictionary /// ``ResponsePayload/metadata(_:)`` with a ``MetadataResponse/values(values:mailbox:)`` case. /// Each entry name maps to a ``MetadataValue`` (which may be `nil` if not found). /// -/// ## Related Types +/// ## Related types /// /// - See ``MetadataEntryName`` for entry name representation /// - See ``MetadataValue`` for entry values diff --git a/Sources/NIOIMAPCore/Grammar/MetadataValue.swift b/Sources/NIOIMAPCore/Grammar/MetadataValue.swift index 29f7d07a..99326ad6 100644 --- a/Sources/NIOIMAPCore/Grammar/MetadataValue.swift +++ b/Sources/NIOIMAPCore/Grammar/MetadataValue.swift @@ -35,7 +35,7 @@ import struct NIO.ByteBuffer /// - `MetadataValue(ByteBuffer("Team folder"))` for `/shared/comment` /// - `MetadataValue(nil)` for `/private/notes` (not set or deleted) /// -/// ## Related Types +/// ## Related types /// /// - See ``MetadataEntryName`` for entry names /// - See ``MetadataResponse`` for complete metadata responses diff --git a/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceDescription.swift b/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceDescription.swift index f8600bf0..8419c782 100644 --- a/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceDescription.swift +++ b/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceDescription.swift @@ -17,7 +17,7 @@ import struct OrderedCollections.OrderedDictionary /// A description of a single namespace, including its prefix and hierarchy delimiter. /// -/// This type represents one namespace descriptor in the server's namespace configuration (RFC 2342). +/// Represents one namespace descriptor in the server's namespace configuration (RFC 2342). /// It consists of a prefix string that specifies the mailbox path hierarchy and an optional hierarchy /// delimiter that separates mailbox name components. For namespaces that do not use a hierarchy delimiter, /// the delimiter is `nil`. @@ -30,7 +30,7 @@ import struct OrderedCollections.OrderedDictionary /// S: * NAMESPACE (("" "/") ("INBOX." ".")) NIL NIL /// ``` /// -/// This response contains two personal namespace descriptors: +/// The response contains two personal namespace descriptors: /// - The first is ``NamespaceDescription`` with prefix `""` (empty string) and delimiter `/` /// - The second is ``NamespaceDescription`` with prefix `INBOX.` and delimiter `.` /// @@ -38,7 +38,7 @@ import struct OrderedCollections.OrderedDictionary public struct NamespaceDescription: Hashable, Sendable { /// The namespace prefix string. /// - /// This prefix specifies the root of the namespace. Mailboxes within this namespace + /// Specifies the root of the namespace. Mailboxes within this namespace /// are accessed by appending the mailbox name to this prefix, separated by the delimiter. /// An empty string indicates the namespace has no prefix (mailboxes are accessed directly). public var string: ByteBuffer @@ -52,7 +52,7 @@ public struct NamespaceDescription: Hashable, Sendable { /// Response extensions for this namespace, supporting future protocol enhancements. /// - /// This dictionary contains arbitrary key-value pairs that may be included by servers + /// Contains arbitrary key-value pairs that may be included by servers /// to provide additional namespace information. Keys are extension names, and values are /// arrays of strings containing the extension parameters. /// Non-standard extensions should be prefixed with `X-` as per RFC 2342. diff --git a/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceResponse.swift b/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceResponse.swift index 9e0ada31..1768e7dc 100644 --- a/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceResponse.swift +++ b/Sources/NIOIMAPCore/Grammar/Namespace/NamespaceResponse.swift @@ -16,7 +16,7 @@ import struct NIO.ByteBuffer /// A response containing the server's namespace configuration for personal, other users', and shared mailboxes. /// -/// This type represents the response to a `NAMESPACE` command (RFC 2342), which allows clients to discover +/// Represents the response to a `NAMESPACE` command (RFC 2342), which allows clients to discover /// the mailbox namespace structure used by the server. The response contains three namespace categories, /// each consisting of zero or more ``NamespaceDescription`` objects. Any category that is not available /// on the server will contain an empty array. @@ -32,7 +32,7 @@ import struct NIO.ByteBuffer /// S: A001 OK NAMESPACE command completed /// ``` /// -/// This response is wrapped as ``NamespaceResponse`` where: +/// The response is wrapped as ``NamespaceResponse`` where: /// - `userNamespace` is `[NamespaceDescription(string: "", delimiter: "/")]` /// - `otherUserNamespace` is `[NamespaceDescription(string: "~", delimiter: "/")]` /// - `sharedNamespace` is `[]` (NIL indicates no shared namespace available) diff --git a/Sources/NIOIMAPCore/Grammar/NetworkMessagePath.swift b/Sources/NIOIMAPCore/Grammar/NetworkMessagePath.swift index 7bf5373c..aa6f738c 100644 --- a/Sources/NIOIMAPCore/Grammar/NetworkMessagePath.swift +++ b/Sources/NIOIMAPCore/Grammar/NetworkMessagePath.swift @@ -25,7 +25,7 @@ import struct NIO.ByteBuffer /// /// ### Usage in IMAP URLs /// -/// This type represents the base URL before any URLAUTH authorization is added: +/// Represents the base URL before any URLAUTH authorization is added: /// ``` /// imap://user@example.com/INBOX/;uidvalidity=100/;uid=20 /// ``` @@ -52,7 +52,7 @@ import struct NIO.ByteBuffer /// /// The `imap://owner@example.com/INBOX/;uid=20` portion would be a ``NetworkMessagePath``. /// -/// ## Related Types +/// ## Related types /// /// - ``MessagePath`` provides the message location (mailbox, UID, section, range) /// - ``IMAPServer`` provides the server connection details diff --git a/Sources/NIOIMAPCore/Grammar/NetworkPath.swift b/Sources/NIOIMAPCore/Grammar/NetworkPath.swift index c01fa9e2..5731da0b 100644 --- a/Sources/NIOIMAPCore/Grammar/NetworkPath.swift +++ b/Sources/NIOIMAPCore/Grammar/NetworkPath.swift @@ -46,7 +46,7 @@ /// Result: imap://other.com/ /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``RelativeIMAPURL`` uses network paths as one variant of relative URLs /// - ``IMAPServer`` provides the server connection specification diff --git a/Sources/NIOIMAPCore/Grammar/Notify/Mailboxes.swift b/Sources/NIOIMAPCore/Grammar/Notify/Mailboxes.swift index 1a07d8be..7fcdbdb8 100644 --- a/Sources/NIOIMAPCore/Grammar/Notify/Mailboxes.swift +++ b/Sources/NIOIMAPCore/Grammar/Notify/Mailboxes.swift @@ -18,7 +18,7 @@ import struct NIO.ByteBuffer /// /// **Requires server capability:** ``Capability/multiSearch`` /// -/// This type represents a non-empty list of mailbox names used with mailbox filters in RFC 7377 MULTIMAILBOX SEARCH. +/// Represents a non-empty list of mailbox names used with mailbox filters in RFC 7377 MULTIMAILBOX SEARCH. /// The filter types are defined in RFC 5465 NOTIFY but are re-used by RFC 7377. Certain filters like /// ``MailboxFilter/subtree(_:)`` and ``MailboxFilter/mailboxes(_:)`` require one or more specific mailbox names. /// See [RFC 7377 Section 3](https://datatracker.ietf.org/doc/html/rfc7377#section-3). @@ -34,7 +34,7 @@ import struct NIO.ByteBuffer /// The mailbox names `"Archive"` and `"Sent Mail"` form a ``Mailboxes`` collection that specifies /// which mailboxes (via ``MailboxFilter``) are included in a multi-mailbox search operation. /// -/// ## Related Types +/// ## Related types /// /// - See ``MailboxFilter`` for different ways to select mailboxes /// - See ``MailboxName`` for individual mailbox name representation @@ -43,7 +43,7 @@ import struct NIO.ByteBuffer public struct Mailboxes: Hashable, Sendable { /// Array of one or more mailbox names. /// - /// This collection must contain at least one mailbox. The mailboxes are represented as + /// Must contain at least one mailbox. The mailboxes are represented as /// ``MailboxName`` values, which can include standard or UTF-7-modified mailbox names. public let content: [MailboxName] diff --git a/Sources/NIOIMAPCore/Grammar/Option/OptionValueComp.swift b/Sources/NIOIMAPCore/Grammar/Option/OptionValueComp.swift index 0a72b39c..75694a24 100644 --- a/Sources/NIOIMAPCore/Grammar/Option/OptionValueComp.swift +++ b/Sources/NIOIMAPCore/Grammar/Option/OptionValueComp.swift @@ -16,7 +16,7 @@ import struct NIO.ByteBuffer /// An option value, which can be a single string or a nested array of values. /// -/// This recursive enum allows option values to be nested arbitrarily deep, enabling representation +/// Allows option values to be nested arbitrarily deep, enabling representation /// of complex structured data in the RFC 4466 extension mechanism. Values can be simple strings /// or arrays of other option values, supporting flexible data representation. /// diff --git a/Sources/NIOIMAPCore/Grammar/Partial/PartialRange.swift b/Sources/NIOIMAPCore/Grammar/Partial/PartialRange.swift index be021cd6..9cc35819 100644 --- a/Sources/NIOIMAPCore/Grammar/Partial/PartialRange.swift +++ b/Sources/NIOIMAPCore/Grammar/Partial/PartialRange.swift @@ -16,7 +16,7 @@ /// /// The `PARTIAL` extension (RFC 9394) allows clients to request `SEARCH` and `FETCH` results /// in fixed-size pages, either from the beginning (`.first`) or end (`.last`) of the result set. -/// This enables efficient pagination of large result sets without retrieving the entire list. +/// Enables efficient pagination of large result sets without retrieving the entire list. /// /// The two forms are: /// - `.first`: Requests N results starting from the lowest UID (beginning) @@ -30,7 +30,7 @@ public enum PartialRange: Hashable, Sendable { case first(SequenceRange) /// A range relative to the newest (highest UID) message. /// - /// This is encoded as negative number. + /// Encoded as a negative number. /// /// Aka. `partial-range-last`. case last(SequenceRange) diff --git a/Sources/NIOIMAPCore/Grammar/Partial/SearchReturnData+Partial.swift b/Sources/NIOIMAPCore/Grammar/Partial/SearchReturnData+Partial.swift index f1979f57..86a61458 100644 --- a/Sources/NIOIMAPCore/Grammar/Partial/SearchReturnData+Partial.swift +++ b/Sources/NIOIMAPCore/Grammar/Partial/SearchReturnData+Partial.swift @@ -17,7 +17,7 @@ import struct NIO.ByteBuffer extension SearchReturnData { /// Partial search results with a specified range. /// - /// This type contains the range that was requested via the `PARTIAL` modifier and the + /// Contains the range that was requested via the `PARTIAL` modifier and the /// message numbers matching the search within that range. The `PARTIAL` extension (RFC 9394) /// enables efficient pagination of large search results. /// diff --git a/Sources/NIOIMAPCore/Grammar/Quota/QuotaLimit.swift b/Sources/NIOIMAPCore/Grammar/Quota/QuotaLimit.swift index c0a9fb75..3d7453fb 100644 --- a/Sources/NIOIMAPCore/Grammar/Quota/QuotaLimit.swift +++ b/Sources/NIOIMAPCore/Grammar/Quota/QuotaLimit.swift @@ -37,7 +37,7 @@ import struct NIO.ByteBuffer /// /// These appear as part of the ``ResponsePayload/quota(_:_:)`` response. /// -/// ## Related Types +/// ## Related types /// /// - See ``QuotaResource`` for current usage along with limits /// - See ``QuotaRoot`` for quota root names @@ -59,7 +59,7 @@ public struct QuotaLimit: Hashable, Sendable { /// Creates a new `QuotaLimit` with a resource name and maximum limit. /// - /// - parameter resourceName: The resource name (e.g., `"STORAGE"`, `"MESSAGE"`). + /// - parameter resourceName: The resource name (for example, `"STORAGE"` or `"MESSAGE"`). /// - parameter limit: The maximum allowed value for the resource. public init(resourceName: String, limit: Int) { self.resourceName = resourceName diff --git a/Sources/NIOIMAPCore/Grammar/Quota/QuotaResource.swift b/Sources/NIOIMAPCore/Grammar/Quota/QuotaResource.swift index 041ba063..15353208 100644 --- a/Sources/NIOIMAPCore/Grammar/Quota/QuotaResource.swift +++ b/Sources/NIOIMAPCore/Grammar/Quota/QuotaResource.swift @@ -37,7 +37,7 @@ import struct NIO.ByteBuffer /// /// These appear as part of the ``ResponsePayload/quota(_:_:)`` response. /// -/// ## Related Types +/// ## Related types /// /// - See ``QuotaLimit`` for just the maximum limit without usage /// - See ``QuotaRoot`` for quota root names @@ -65,7 +65,7 @@ public struct QuotaResource: Hashable, Sendable { /// Creates a new `QuotaResource` with current usage and maximum limit. /// - /// - parameter resourceName: The resource name (e.g., `"STORAGE"`, `"MESSAGE"`). + /// - parameter resourceName: The resource name (for example, `"STORAGE"` or `"MESSAGE"`). /// - parameter usage: The current usage of the resource. /// - parameter limit: The maximum allowed value for the resource. public init(resourceName: String, usage: Int, limit: Int) { diff --git a/Sources/NIOIMAPCore/Grammar/Quota/QuotaRoot.swift b/Sources/NIOIMAPCore/Grammar/Quota/QuotaRoot.swift index c3965eaa..22e768b5 100644 --- a/Sources/NIOIMAPCore/Grammar/Quota/QuotaRoot.swift +++ b/Sources/NIOIMAPCore/Grammar/Quota/QuotaRoot.swift @@ -35,7 +35,7 @@ import struct NIO.ByteBufferView /// along with an array of ``QuotaResource`` values. This response is wrapped as /// ``Response/untagged(_:)`` containing ``ResponsePayload/quota(_:_:)``. /// -/// ## Related Types +/// ## Related types /// /// - See ``QuotaResource`` for resource usage and limits /// - See ``ResponsePayload/quotaRoot(_:_:)`` for mailbox-to-quota-root associations diff --git a/Sources/NIOIMAPCore/Grammar/RelativeIMAPURL.swift b/Sources/NIOIMAPCore/Grammar/RelativeIMAPURL.swift index db6fc867..f8429298 100644 --- a/Sources/NIOIMAPCore/Grammar/RelativeIMAPURL.swift +++ b/Sources/NIOIMAPCore/Grammar/RelativeIMAPURL.swift @@ -55,7 +55,7 @@ /// imap://user@example.com/INBOX/ /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``IMAPURL`` provides absolute URL specification /// - ``NetworkPath`` represents network-accessible paths diff --git a/Sources/NIOIMAPCore/Grammar/Response/ExtendedSearchResponse.swift b/Sources/NIOIMAPCore/Grammar/Response/ExtendedSearchResponse.swift index 30a08cc6..bdc80a3f 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/ExtendedSearchResponse.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/ExtendedSearchResponse.swift @@ -35,7 +35,7 @@ import struct NIO.ByteBuffer /// indicates the search matched 42 messages (COUNT 42) and provides the UIDs of all matches /// (ALL 1,3,5,7,9,...) because UID was specified and RETURN (COUNT ALL) was requested. /// -/// ## Related Types +/// ## Related types /// /// Link to related types using DocC symbol links: ``SearchReturnOption``, ``SearchReturnData``, /// ``SearchCorrelator``. @@ -115,7 +115,7 @@ extension ExtendedSearchResponse { /// Returns `nil` if this is not a UID response or if the response does not contain matched UIDs. /// When no matching UIDs exist, this property returns an empty set rather than `nil`. /// - /// This property extracts UIDs from ``SearchReturnData/all(_:)`` if present, or falls back to + /// Extracts UIDs from ``SearchReturnData/all(_:)`` if present, or falls back to /// ``SearchReturnData/partial(_:_:)`` if only partial results are available. Per RFC 9394, a /// single SEARCH response should contain either ALL or PARTIAL, but not both; if both are /// present, ALL takes precedence. @@ -132,7 +132,7 @@ extension ExtendedSearchResponse { /// Returns `nil` if this is not a sequence number response or if the response does not contain matched sequence numbers. /// When no matching sequence numbers exist, this property returns an empty set rather than `nil`. /// - /// This property extracts sequence numbers from ``SearchReturnData/all(_:)`` if present, or falls back to + /// Extracts sequence numbers from ``SearchReturnData/all(_:)`` if present, or falls back to /// ``SearchReturnData/partial(_:_:)`` if only partial results are available. Per RFC 9394, a /// single SEARCH response should contain either ALL or PARTIAL, but not both; if both are /// present, ALL takes precedence. diff --git a/Sources/NIOIMAPCore/Grammar/Response/Response.swift b/Sources/NIOIMAPCore/Grammar/Response/Response.swift index e56e7a65..cb87ee43 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/Response.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/Response.swift @@ -27,7 +27,7 @@ public enum ResponseOrContinuationRequest: Hashable, Sendable { /// and command continuation requests (prefixed with `+`). This enum wraps all response variants. /// See [RFC 3501 Section 7](https://datatracker.ietf.org/doc/html/rfc3501#section-7) for details. /// -/// ## Response Types +/// ## Response types /// /// **Untagged responses** (``untagged(_:)``) convey server data or status information that does not /// indicate command completion. Examples include capabilities, mailbox status, and message data. @@ -123,7 +123,7 @@ public enum Response: Hashable, Sendable { /// S: * BYE Server shutting down /// ``` /// - /// This line is wrapped as ``Response/fatal(_:)`` containing a ``ResponseText`` with the + /// The line is wrapped as ``Response/fatal(_:)`` containing a ``ResponseText`` with the /// server's message. /// /// - SeeAlso: ``ResponseText``, [RFC 3501 Section 7.1.3](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.3) @@ -195,7 +195,7 @@ extension Response: CustomDebugStringConvertible { /// Creates a string from the array of `Response` with all _personally identifiable information_ redacted. /// - /// This is equivalent to joining `debugDescription` of all elements. + /// Equivalent to joining `debugDescription` of all elements. public static func descriptionWithoutPII(_ responses: some Sequence) -> String { ResponseEncodeBuffer.makeDescription(loggingMode: true) { for response in responses { @@ -228,7 +228,7 @@ extension Response: CustomDebugStringConvertible { /// S: ) /// ``` /// -/// This represents a fetch for message 1. The first line contains the simple attributes +/// The above represents a fetch for message 1. The first line contains the simple attributes /// (UID and FLAGS), wrapped in separate ``FetchResponse/simpleAttribute(_:)`` events. The /// second part begins a streaming section with ``FetchResponse/streamingBegin(kind:byteCount:)`` /// for the message body, followed by ``FetchResponse/streamingBytes(_:)`` events, and @@ -238,7 +238,7 @@ extension Response: CustomDebugStringConvertible { public enum FetchResponse: Hashable, Sendable { /// The beginning of a fetch response for the message at the given sequence number. /// - /// This is the first event in a fetch response sequence. The sequence number can be used to + /// The first event in a fetch response sequence. The sequence number can be used to /// correlate this fetch with the original FETCH command. /// /// - SeeAlso: ``SequenceNumber``, [RFC 3501 Section 2.3.1.2](https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.1.2) @@ -248,7 +248,7 @@ public enum FetchResponse: Hashable, Sendable { /// /// When a client uses “UID Only” mode (see [RFC 9586](https://datatracker.ietf.org/doc/html/rfc9586)), /// the server returns only the UID in the FETCH response rather than the sequence number. - /// This is more efficient for pipelined commands. + /// More efficient for pipelined commands. /// /// - SeeAlso: ``UID``, [RFC 9586](https://datatracker.ietf.org/doc/html/rfc9586) - IMAP Extension: SUBMIT case startUID(UID) @@ -264,7 +264,7 @@ public enum FetchResponse: Hashable, Sendable { /// The start of a streaming section containing potentially large data. /// - /// This event indicates that a large message part (body, RFC 822 header, etc.) is about to be + /// Indicates that a large message part (body, RFC 822 header, etc.) is about to be /// streamed to the client. The ``StreamingKind`` specifies which part is being streamed, /// and the `byteCount` parameter indicates the total bytes that will follow. /// @@ -288,7 +288,7 @@ public enum FetchResponse: Hashable, Sendable { /// The end of the currently streaming section. /// - /// This marks the completion of a streaming section started by ``streamingBegin(kind:byteCount:)``. + /// Marks the completion of a streaming section started by ``streamingBegin(kind:byteCount:)``. /// More streaming sections may immediately follow, or the fetch may complete with ``finish``. /// /// - SeeAlso: ``streamingBegin(kind:byteCount:)`` @@ -296,7 +296,7 @@ public enum FetchResponse: Hashable, Sendable { /// The end of all fetch data for this message. /// - /// This is the final event in a fetch response sequence. After this, processing of the message + /// The final event in a fetch response sequence. After this, processing of the message /// is complete, and a new fetch (or other response) may begin. case finish } @@ -328,7 +328,7 @@ public enum StreamingKind: Hashable, Sendable { /// The `BINARY[1] {512}` indicates that 512 bytes of binary data from message part 1 will be /// streamed. This corresponds to ``StreamingKind/binary(section:offset:)`` with an empty offset. /// - /// - parameter section: The part of the message to fetch (e.g., 1, 2.1) + /// - parameter section: The part of the message to fetch (for example, 1 or 2.1) /// - parameter offset: Optional byte offset for partial fetch (requires RFC 9394 PARTIAL extension) /// /// - SeeAlso: ``SectionSpecifier/Part``, [RFC 3516](https://datatracker.ietf.org/doc/html/rfc3516) @@ -337,7 +337,7 @@ public enum StreamingKind: Hashable, Sendable { /// A body section being streamed. /// /// The `BODY` fetch item returns message structure and content according to [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501). - /// The `section` specifies which part of the message is being returned (e.g., TEXT for the message body, + /// The `section` specifies which part of the message is being returned (for example, TEXT for the message body, /// HEADER for headers, or 1.2.3 for nested MIME parts). The `offset` specifies a byte offset for /// partial fetches. /// @@ -350,7 +350,7 @@ public enum StreamingKind: Hashable, Sendable { /// ``` /// /// The `BODY[TEXT] {1024}` indicates that 1024 bytes of the message body text will be streamed. - /// This corresponds to ``StreamingKind/body(section:offset:)`` with the TEXT section specifier. + /// Corresponds to ``StreamingKind/body(section:offset:)`` with the TEXT section specifier. /// /// - parameter section: The section specifier (part and section type) /// - parameter offset: Optional byte offset for partial fetch (requires RFC 9394 PARTIAL extension) @@ -372,7 +372,7 @@ public enum StreamingKind: Hashable, Sendable { /// ``` /// /// The `RFC822 {2048}` indicates that 2048 bytes of the complete message will be streamed. - /// This corresponds to ``StreamingKind/rfc822``. + /// Corresponds to ``StreamingKind/rfc822``. /// /// - SeeAlso: [RFC 3501 Section 6.4.5](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.5) case rfc822 @@ -391,7 +391,7 @@ public enum StreamingKind: Hashable, Sendable { /// ``` /// /// The `RFC822.TEXT {1024}` indicates that 1024 bytes of the message body will be streamed. - /// This corresponds to ``StreamingKind/rfc822Text``. + /// Corresponds to ``StreamingKind/rfc822Text``. /// /// - SeeAlso: [RFC 3501 Section 6.4.5](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.5) case rfc822Text @@ -410,7 +410,7 @@ public enum StreamingKind: Hashable, Sendable { /// ``` /// /// The `RFC822.HEADER {512}` indicates that 512 bytes of the message headers will be streamed. - /// This corresponds to ``StreamingKind/rfc822Header``. + /// Corresponds to ``StreamingKind/rfc822Header``. /// /// - SeeAlso: [RFC 3501 Section 6.4.5](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.5) case rfc822Header diff --git a/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeAppend.swift b/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeAppend.swift index 3ae0eb15..a86af7b4 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeAppend.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeAppend.swift @@ -35,7 +35,7 @@ public struct ResponseCodeAppend: Hashable, Sendable { /// The UID validity value of the destination mailbox. /// - /// This value allows clients to validate that the UIDs returned in this response are still + /// Allows clients to validate that the UIDs returned in this response are still /// correct if they are later referenced. If the UID validity changes, all cached UIDs are invalid. /// /// - SeeAlso: ``UIDValidity`` @@ -43,7 +43,7 @@ public struct ResponseCodeAppend: Hashable, Sendable { /// The UIDs of the messages after they have been appended. /// - /// This set contains the UID or UIDs assigned by the server to the messages that were just + /// Contains the UID or UIDs assigned by the server to the messages that were just /// appended. The sequence and count of UIDs corresponds to the number of messages appended by /// the APPEND command. /// diff --git a/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeCopy.swift b/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeCopy.swift index fc2fc8e0..3a9aacff 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeCopy.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/ResponseCodeCopy.swift @@ -39,7 +39,7 @@ public struct ResponseCodeCopy: Hashable, Sendable { /// The UID validity value of the destination mailbox. /// - /// This value allows clients to validate that the destination UIDs are still correct if + /// Allows clients to validate that the destination UIDs are still correct if /// referenced later. If the UID validity of the destination mailbox changes, the cached /// destination UIDs become invalid. /// diff --git a/Sources/NIOIMAPCore/Grammar/Response/ResponsePayload.swift b/Sources/NIOIMAPCore/Grammar/Response/ResponsePayload.swift index 23ea5e87..412a10e2 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/ResponsePayload.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/ResponsePayload.swift @@ -44,7 +44,7 @@ import struct OrderedCollections.OrderedDictionary /// The third line corresponds to ``capabilityData(_:)``, while the fourth corresponds /// to ``id(_:)``. /// -/// ## Related Types +/// ## Related types /// /// See ``Response`` for the main response wrapper, ``UntaggedStatus`` for conditional status responses, /// and ``ResponsePayload`` cases for detailed information types. @@ -53,7 +53,7 @@ import struct OrderedCollections.OrderedDictionary public enum ResponsePayload: Hashable, Sendable { /// Indicates if a command executed successfully or encountered an error. /// - /// This case wraps an ``UntaggedStatus`` which can be `OK` (success), `NO` (warning/rejection), + /// Wraps an ``UntaggedStatus`` which can be `OK` (success), `NO` (warning/rejection), /// `BAD` (protocol error), `PREAUTH` (pre-authenticated), or `BYE` (server closing connection). /// See [RFC 3501 Section 7.1](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1) for /// details on status responses. @@ -61,33 +61,33 @@ public enum ResponsePayload: Hashable, Sendable { /// Contains information on a single mailbox. /// - /// This case wraps mailbox-specific data such as flags, existence counts, recent count, + /// Wraps mailbox-specific data such as flags, existence counts, recent count, /// and search results. See ``MailboxData`` for the various mailbox information types. case mailboxData(MailboxData) /// Contains information on a single message. /// - /// This case wraps message-specific data returned during FETCH operations or other + /// Wraps message-specific data returned during FETCH operations or other /// message queries. See ``MessageData`` for the various message attribute types. case messageData(MessageData) /// An array of capabilities supported by the server. /// - /// This case is returned in response to `CAPABILITY` commands or as part of the initial + /// Returned in response to `CAPABILITY` commands or as part of the initial /// server greeting. It indicates which IMAP extensions and features the server supports. /// See [RFC 3501 Section 7.1](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1) and ``Capability``. case capabilityData([Capability]) /// An array of capabilities that have been enabled on the server by the client. /// - /// This case is returned in response to an `ENABLE` command and lists the capabilities + /// Returned in response to an `ENABLE` command and lists the capabilities /// that were successfully enabled. See [RFC 5161](https://datatracker.ietf.org/doc/html/rfc5161) /// (ENABLE Extension) for details. case enableData([Capability]) /// The server's implementation details used for identification. /// - /// This case contains an ordered dictionary of key-value pairs providing server identification + /// Contains an ordered dictionary of key-value pairs providing server identification /// information. Common keys include "name", "version", and "os". Returned in response to /// the ID command. See [RFC 2971](https://datatracker.ietf.org/doc/html/rfc2971) (ID Extension) /// for details. @@ -95,26 +95,26 @@ public enum ResponsePayload: Hashable, Sendable { /// Matches a quota root with a mailbox. /// - /// This case associates a mailbox with its quota root. Multiple mailboxes may share the same + /// Associates a mailbox with its quota root. Multiple mailboxes may share the same /// quota root. See [RFC 2087](https://datatracker.ietf.org/doc/html/rfc2087) (QUOTA Extension) /// for details and ``QuotaRoot``. case quotaRoot(MailboxName, QuotaRoot) /// Contains quotas and resource limits for the specified quota root. /// - /// This case provides the usage and limit information for a quota root. See [RFC 2087](https://datatracker.ietf.org/doc/html/rfc2087) + /// Provides the usage and limit information for a quota root. See [RFC 2087](https://datatracker.ietf.org/doc/html/rfc2087) /// for details on quota resources and ``QuotaResource``. case quota(QuotaRoot, [QuotaResource]) /// Metadata for a mailbox. /// - /// This case provides metadata entries for a mailbox, as requested by a `GETMETADATA` command. + /// Provides metadata entries for a mailbox, as requested by a `GETMETADATA` command. /// See [RFC 5464](https://datatracker.ietf.org/doc/html/rfc5464) (METADATA Extension) for details. case metadata(MetadataResponse) /// JMAP Access URL for the mailbox. /// - /// This case provides a URL that allows clients to access mailbox data via JMAP (JSON Mail + /// Provides a URL that allows clients to access mailbox data via JMAP (JSON Mail /// Access Protocol). See [RFC 9698](https://datatracker.ietf.org/doc/html/rfc9698) (JMAPACCESS Extension) /// for details. case jmapAccess(URL) diff --git a/Sources/NIOIMAPCore/Grammar/Response/ResponseText.swift b/Sources/NIOIMAPCore/Grammar/Response/ResponseText.swift index 3ec4c7d5..4e424f60 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/ResponseText.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/ResponseText.swift @@ -37,7 +37,7 @@ import struct NIO.ByteBuffer public struct ResponseText: Hashable, Sendable { /// The optional structured status code providing additional semantic information. /// - /// Status codes are brief tokens that communicate specific server conditions (e.g., `[ALERT]`, + /// Status codes are brief tokens that communicate specific server conditions (for example, `[ALERT]`, /// `[CANNOT]`, `[PERMANENT]`). They provide machine-readable information to clients that extends /// the human-readable text. Not all responses include a code; `nil` indicates no code is present. /// diff --git a/Sources/NIOIMAPCore/Grammar/Response/ResponseTextCode.swift b/Sources/NIOIMAPCore/Grammar/Response/ResponseTextCode.swift index bac446b4..3465516a 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/ResponseTextCode.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/ResponseTextCode.swift @@ -20,7 +20,7 @@ import struct NIO.ByteBuffer /// Response text codes provide machine-readable status information accompanying tagged responses /// and some untagged responses. They indicate the reason for command success or failure, provide /// mailbox status updates, or convey extension-specific information. Servers send these codes -/// within square brackets in the response text (e.g., `[TRYCREATE]`, `[UIDVALIDITY 1234]`). +/// within square brackets in the response text (for example, `[TRYCREATE]` or `[UIDVALIDITY 1234]`). /// See [RFC 3501 Section 7.1](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1) for the /// base protocol codes, and the IMAP extensions for domain-specific codes. /// @@ -45,7 +45,7 @@ import struct NIO.ByteBuffer public indirect enum ResponseTextCode: Hashable, Sendable { /// The human-readable text contains a special alert that MUST be presented to the user. /// - /// This code indicates that the accompanying text is a special alert that requires user + /// Indicates that the accompanying text is a special alert that requires user /// attention. The client should display this message in a way that is noticeable to the end user. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -53,7 +53,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The operation attempts to create something that already exists. /// - /// This code indicates that the operation failed because it would create a duplicate. For example, + /// Indicates that the operation failed because it would create a duplicate. For example, /// CREATE or RENAME commands fail if the target mailbox name already exists. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -61,7 +61,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// A `SEARCH` command failed because the specified character set is unsupported. /// - /// This code indicates that a `SEARCH` command referenced a character set that the server does not + /// Indicates that a `SEARCH` command referenced a character set that the server does not /// support. The optional list of character sets indicates which sets are supported by the server, /// allowing the client to retry with a supported charset. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and @@ -70,15 +70,15 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Followed by a list of supported capabilities. /// - /// This code may appear in the initial `OK` or `PREAUTH` response to transmit the server's capability list. - /// This allows the client to learn the server's capabilities without sending a separate `CAPABILITY` command. + /// May appear in the initial `OK` or `PREAUTH` response to transmit the server's capability list. + /// Allows the client to learn the server's capabilities without sending a separate `CAPABILITY` command. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. case capability([Capability]) /// The human-readable text represents an error in parsing message headers. /// - /// This code indicates that the server encountered an error while parsing the [RFC-2822] headers + /// Indicates that the server encountered an error while parsing the [RFC-2822] headers /// or [MIME] headers of a message in the mailbox. This typically indicates message corruption. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -86,7 +86,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Followed by a list of flags that the client can change permanently. /// - /// This code lists the flags that the client is allowed to store permanently in the selected mailbox. + /// Lists the flags that the client is allowed to store permanently in the selected mailbox. /// Flags not in this list may only be stored for the current session. The special flag `\*` indicates /// that new keywords can be created by attempting to store them. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and @@ -95,7 +95,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The selected mailbox is read-only. /// - /// This code indicates that the mailbox is selected in read-only mode, or that its access has + /// Indicates that the mailbox is selected in read-only mode, or that its access has /// changed from read-write to read-only. The client cannot store messages, delete messages, or /// modify flags in a read-only mailbox. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and @@ -104,7 +104,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The selected mailbox is read-write. /// - /// This code indicates that the mailbox is selected in read-write mode, or that its access has + /// Indicates that the mailbox is selected in read-write mode, or that its access has /// changed from read-only to read-write. The client can store messages, delete messages, and /// modify flags in a read-write mailbox. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and @@ -113,7 +113,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// An `APPEND` or `COPY` operation failed because the target mailbox does not exist. /// - /// This code suggests that the operation can succeed if the mailbox is first created using the + /// Suggests that the operation can succeed if the mailbox is first created using the /// `CREATE` command. This is a hint to the client about how to recover from the failure. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -121,14 +121,14 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Indicates the next unique identifier value. /// - /// This code contains the UID that will be assigned to the next message appended to the selected mailbox. + /// Contains the UID that will be assigned to the next message appended to the selected mailbox. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. case uidNext(UID) /// Indicates the unique identifier validity value. /// - /// This code contains the UIDVALIDITY value for the selected mailbox. The client must remember this + /// Contains the UIDVALIDITY value for the selected mailbox. The client must remember this /// value; if it changes, all cached UIDs are invalidated. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -136,7 +136,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Indicates the sequence number of the first message without the ``Flag/seen`` flag set. /// - /// This code identifies the message number (in sequence order) of the first message in the mailbox + /// Identifies the message number (in sequence order) of the first message in the mailbox /// that does not have the `\Seen` flag set, indicating an unread message. /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -144,64 +144,64 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// A command was unable to complete due to a namespace access restriction. /// - /// This code indicates that the command attempted to perform an operation in a namespace that the + /// Indicates that the command attempted to perform an operation in a namespace that the /// user does not have permission to access. This is part of the NAMESPACE extension. /// See [RFC 2342](https://datatracker.ietf.org/doc/html/rfc2342) (NAMESPACE Extension) for details. case namespace(NamespaceResponse) /// Indicates the `UIDVALIDITY` and `UID` assigned to an appended message. /// - /// This code is returned in response to an `APPEND` command. It contains the `UIDVALIDITY` of the + /// Returned in response to an `APPEND` command. It contains the `UIDVALIDITY` of the /// destination mailbox and the `UID` assigned to the newly appended message in that mailbox. - /// This is part of the UIDPLUS extension. + /// Part of the UIDPLUS extension. /// See [RFC 4315](https://datatracker.ietf.org/doc/html/rfc4315) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. case uidAppend(ResponseCodeAppend) /// Indicates the UIDs of messages copied to a destination mailbox. /// - /// This code is returned in response to a `COPY` command. It contains the `UIDVALIDITY` of the + /// Returned in response to a `COPY` command. It contains the `UIDVALIDITY` of the /// destination mailbox and the `UID`s assigned to the copied message(s) in that mailbox. - /// This is part of the UIDPLUS extension. + /// Part of the UIDPLUS extension. /// See [RFC 4315](https://datatracker.ietf.org/doc/html/rfc4315) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. case uidCopy(ResponseCodeCopy) /// The selected mailbox does not support persistent UIDs. /// - /// This code indicates that the mail store does not support persistent UIDs; the `UIDVALIDITY` + /// Indicates that the mail store does not support persistent UIDs; the `UIDVALIDITY` /// value will be different each time the mailbox is selected. Therefore, `APPEND` and `COPY` commands /// will not return `APPENDUID` or `COPYUID` codes. - /// This is part of the UIDPLUS extension. + /// Part of the UIDPLUS extension. /// See [RFC 4315](https://datatracker.ietf.org/doc/html/rfc4315) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. case uidNotSticky /// The special-use attribute cannot be assigned to this mailbox. /// - /// This code indicates that the `CREATE` command failed because the server cannot create a mailbox - /// with the specified special-use attribute. This is part of the Special-Use Mailbox extension. + /// Indicates that the `CREATE` command failed because the server cannot create a mailbox + /// with the specified special-use attribute. Part of the Special-Use Mailbox extension. /// See [RFC 6154](https://datatracker.ietf.org/doc/html/rfc6154) (Special-Use Mailbox Attributes) for details. case useAttribute /// A server-specific or unknown response code. /// - /// This catch-all case supports response codes that may be sent by future IMAP extensions or + /// A catch-all case that supports response codes that may be sent by future IMAP extensions or /// vendor-specific implementations. The first string is the code name, and the optional second /// string is any accompanying data. case other(String, String?) /// The server refused to save a `SEARCH` (`SAVE`) result. /// - /// This code indicates that a `SEARCH` (`SAVE`) command failed because the server has reached an + /// Indicates that a `SEARCH` (`SAVE`) command failed because the server has reached an /// internal limit on the number of saved search results. - /// This is part of the extended SEARCH extension. + /// Part of the extended SEARCH extension. /// See [RFC 5182](https://datatracker.ietf.org/doc/html/rfc5182) (Last SEARCH Result Reference Extension) for details. case notSaved /// Boundary marker between responses for different mailboxes. /// - /// This code appears when the server closes one mailbox and selects another. All responses + /// Appears when the server closes one mailbox and selects another. All responses /// before the `CLOSED` code relate to the previously selected mailbox, and all responses after /// relate to the newly selected mailbox. /// See [RFC 5162](https://datatracker.ietf.org/doc/html/rfc5162) and @@ -210,7 +210,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The selected mailbox does not support persistent modification sequences. /// - /// This code appears in the `OK` response to `SELECT` or `EXAMINE` commands when the server does not + /// Appears in the `OK` response to `SELECT` or `EXAMINE` commands when the server does not /// support persistent storage of modification sequences (mod-sequences) for the mailbox. Each /// successful `SELECT` or `EXAMINE` must include this code if the mailbox lacks mod-sequence support. /// See [RFC 4551](https://datatracker.ietf.org/doc/html/rfc4551) (CONDSTORE Extension) for details. @@ -218,14 +218,14 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Indicates which messages were modified by a `STORE` command. /// - /// This code is returned in response to a `STORE` command and lists the messages that were actually - /// modified. This allows the client to detect when the server rejected modifications for specific messages. + /// Returned in response to a `STORE` command and lists the messages that were actually + /// modified. Allows the client to detect when the server rejected modifications for specific messages. /// See [RFC 4551](https://datatracker.ietf.org/doc/html/rfc4551) (CONDSTORE Extension) for details. case modified(LastCommandSet) /// Indicates the highest modification sequence value in the mailbox. /// - /// This code appears in `OK` responses to `SELECT` or `EXAMINE` commands when the server supports + /// Appears in `OK` responses to `SELECT` or `EXAMINE` commands when the server supports /// persistent modification sequences. The value indicates the highest mod-sequence value assigned /// to any message in the mailbox. /// See [RFC 4551](https://datatracker.ietf.org/doc/html/rfc4551) (CONDSTORE Extension) for details. @@ -233,47 +233,47 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// A metadata entry value exceeded the MAXSIZE limit. /// - /// This code is returned in the `GETMETADATA` command response when one or more entry values + /// Returned in the `GETMETADATA` command response when one or more entry values /// exceed the `MAXSIZE` limit. The value indicates the size of the largest entry that was requested /// but exceeded the limit. - /// This is part of the METADATA extension. + /// Part of the METADATA extension. /// See [RFC 5464](https://datatracker.ietf.org/doc/html/rfc5464) (METADATA Extension) for details. case metadataLongEntries(Int) /// The server cannot set an annotation due to size limitations. /// - /// This code indicates that a `SETMETADATA` command failed because an entry value is too large. + /// Indicates that a `SETMETADATA` command failed because an entry value is too large. /// The value indicates the maximum size allowed by the server. - /// This is part of the METADATA extension. + /// Part of the METADATA extension. /// See [RFC 5464](https://datatracker.ietf.org/doc/html/rfc5464) (METADATA Extension) for details. case metadataMaxsize(Int) /// The maximum number of allowed annotations has been reached. /// - /// This code indicates that a `SETMETADATA` command failed because the server has reached the + /// Indicates that a `SETMETADATA` command failed because the server has reached the /// maximum number of annotations allowed for the mailbox or server. - /// This is part of the METADATA extension. + /// Part of the METADATA extension. /// See [RFC 5464](https://datatracker.ietf.org/doc/html/rfc5464) (METADATA Extension) for details. case metadataTooMany /// The server does not support private annotations on one or more specified mailboxes. /// - /// This code indicates that a SETMETADATA command failed because the server does not allow + /// Indicates that a SETMETADATA command failed because the server does not allow /// private annotations on one of the specified mailboxes. - /// This is part of the METADATA extension. + /// Part of the METADATA extension. /// See [RFC 5464](https://datatracker.ietf.org/doc/html/rfc5464) (METADATA Extension) for details. case metadataNoPrivate /// Indicates the supported authentication mechanisms for URLAUTH. /// - /// This code appears in `OK` responses to `RESETKEY`, `SELECT`, or `EXAMINE` commands. For `RESETKEY`, + /// Appears in `OK` responses to `RESETKEY`, `SELECT`, or `EXAMINE` commands. For `RESETKEY`, /// it may appear in the tagged `OK` response instead of a separate untagged response. /// See [RFC 4467](https://datatracker.ietf.org/doc/html/rfc4467) for details. case urlMechanisms([MechanismBase64]) /// The server directs the client to another IMAP server. /// - /// This code is returned in a `BYE` response when the server is not accepting connections and wishes + /// Returned in a `BYE` response when the server is not accepting connections and wishes /// to direct the client to another server for the same account or mailbox. The IMAP URL points to /// the referral server. /// See [RFC 2221](https://datatracker.ietf.org/doc/html/rfc2221) for details. @@ -281,7 +281,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Temporary server failure or subsystem unavailability. /// - /// This code indicates that the server is temporarily unable to complete the command due to a + /// Indicates that the server is temporarily unable to complete the command due to a /// subsystem being down or unavailable. The client may retry the command later. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -289,7 +289,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Authentication failed for unspecified reasons. /// - /// This code indicates that an authentication command failed, but the server is unwilling to + /// Indicates that an authentication command failed, but the server is unwilling to /// provide details about the reason for the failure. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -297,16 +297,16 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Authorization identity cannot be assumed. /// - /// This code indicates that authentication succeeded with the authentication identity, but the + /// Indicates that authentication succeeded with the authentication identity, but the /// server cannot or will not allow that identity to act as the requested authorization identity. - /// This only applies when the authentication and authorization identities are different. + /// Applies only when the authentication and authorization identities are different. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. case authorizationFailed /// The authentication or authorization passphrase has expired. /// - /// This code indicates that either authentication succeeded but the server no longer has the + /// Indicates that either authentication succeeded but the server no longer has the /// necessary data, or the passphrase is no longer valid. The client or user should obtain a /// new passphrase. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and @@ -315,7 +315,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Privacy support is required to perform this operation. /// - /// This code indicates that the operation cannot be completed without privacy protection. If + /// Indicates that the operation cannot be completed without privacy protection. If /// TLS is not in use, the client could try STARTTLS and then retry the operation. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -323,7 +323,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// User should contact the system administrator. /// - /// This code indicates that the user should contact the system administrator or support desk + /// Indicates that the user should contact the system administrator or support desk /// to resolve the issue. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -331,7 +331,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Insufficient access permissions for this operation. /// - /// This code indicates that the access control system (e.g., ACL) does not permit the user to + /// Indicates that the access control system (for example, ACL) does not permit the user to /// perform the requested operation, such as selecting or creating a mailbox. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -339,7 +339,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Operation conflicts with resource usage by another client. /// - /// This code indicates that the operation was not carried out because it involves removing a + /// Indicates that the operation was not carried out because it involves removing a /// resource that another client is currently using. For example, another client may be holding /// an exclusive lock or using a mailbox that would be deleted. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and @@ -348,7 +348,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Another client has issued an EXPUNGE command for this mailbox. /// - /// This code indicates that another client has expunged messages from the selected mailbox. + /// Indicates that another client has expunged messages from the selected mailbox. /// The client may want to issue a NOOP command soon to refresh its view. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -356,7 +356,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The server detected data corruption. /// - /// This code indicates that the server has discovered that relevant data (such as mailbox data) + /// Indicates that the server has discovered that relevant data (such as mailbox data) /// is corrupt. This does not specify what is corrupt, but the server will have written details /// to its log files. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and @@ -365,7 +365,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The server encountered an internal bug or invariant violation. /// - /// This code indicates that the server encountered a bug in itself or violated one of its own + /// Indicates that the server encountered a bug in itself or violated one of its own /// invariants during command processing. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -373,7 +373,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The server detected a client protocol violation. /// - /// This code indicates that the server has detected a client bug. This may accompany OK, NO, or BAD + /// Indicates that the server has detected a client bug. This may accompany OK, NO, or BAD /// responses depending on the nature of the client bug. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -381,7 +381,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The operation violates a server invariant and cannot succeed. /// - /// This code indicates that the requested operation violates some invariant of the server and + /// Indicates that the requested operation violates some invariant of the server and /// can never succeed, regardless of how the client retries. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -389,7 +389,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The operation exceeds a server implementation limit. /// - /// This code indicates that the operation ran up against an implementation limit of some kind, + /// Indicates that the operation ran up against an implementation limit of some kind, /// such as the maximum number of flags per message or the maximum number of distinct flags /// used in a mailbox. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and @@ -398,7 +398,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The user's quota would be exceeded by this operation. /// - /// This code indicates that the user would exceed their quota if the operation completed. The + /// Indicates that the user would exceed their quota if the operation completed. The /// user may or may not already be over quota. Note that if the server sends OVERQUOTA but does /// not support the QUOTA extension, the client cannot determine the actual quota limits. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and @@ -407,7 +407,7 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// The operation attempts to delete something that does not exist. /// - /// This code indicates that the operation failed because it tried to delete something that does not + /// Indicates that the operation failed because it tried to delete something that does not /// exist. This is similar to ``alreadyExists`` but indicates a DELETE operation instead of a CREATE. /// See [RFC 5530](https://datatracker.ietf.org/doc/html/rfc5530) and /// [RFC 9051](https://datatracker.ietf.org/doc/html/rfc9051) for details. @@ -415,22 +415,22 @@ public indirect enum ResponseTextCode: Hashable, Sendable { /// Compression is currently active on the connection. /// - /// This code indicates that the COMPRESS command has been issued and compression is now active + /// Indicates that the COMPRESS command has been issued and compression is now active /// on the connection. This is part of the COMPRESS=DEFLATE extension. /// See [RFC 4978](https://datatracker.ietf.org/doc/html/rfc4978) (COMPRESS Extension) for details. case compressionActive /// A unique identifier for the selected mailbox. /// - /// This code contains the MAILBOXID value for the selected mailbox. The client should remember + /// Contains the MAILBOXID value for the selected mailbox. The client should remember /// this value to track mailboxes across sessions. - /// This is part of the OBJECTID extension. + /// Part of the OBJECTID extension. /// See [RFC 8474](https://datatracker.ietf.org/doc/html/rfc8474) (OBJECTID Extension) for details. case mailboxID(MailboxID) /// The client must not use message sequence numbers. /// - /// This code indicates that the server does not support the use of message sequence numbers and + /// Indicates that the server does not support the use of message sequence numbers and /// requires the client to use UIDs instead. This is part of the UIDONLY extension. /// See [RFC 9586](https://datatracker.ietf.org/doc/html/rfc9586) (SUBMIT Extension) for details. case uidRequired diff --git a/Sources/NIOIMAPCore/Grammar/Response/TaggedResponse.swift b/Sources/NIOIMAPCore/Grammar/Response/TaggedResponse.swift index 6e51aca9..bc58b939 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/TaggedResponse.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/TaggedResponse.swift @@ -19,7 +19,7 @@ import struct NIO.ByteBuffer /// Every client command receives exactly one tagged response from the server. The response contains /// the original command tag (to correlate with the sent command), a status code (`OK`, `NO`, or `BAD`), /// and optional human-readable text with additional information. Tagged responses mark the completion -/// of command processing and may include structured status codes (e.g., `[CANNOT]`, `[TRYCREATE]`) +/// of command processing and may include structured status codes (for example, `[CANNOT]` or `[TRYCREATE]`) /// that provide machine-readable details. /// See [RFC 3501 Section 7.1](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1) for details. /// @@ -39,10 +39,10 @@ import struct NIO.ByteBuffer /// S: A002 NO [CANNOT] Mailbox does not exist /// ``` /// -/// This tagged response has tag `A002`, state ``State/no(_:)``, and a ``ResponseText`` containing +/// The tagged response has tag `A002`, state ``State/no(_:)``, and a ``ResponseText`` containing /// a ``ResponseTextCode/cannot`` code with human-readable text explaining the failure. /// -/// ## Related Types +/// ## Related types /// /// - ``Response/tagged(_:)`` - Wraps this type within the ``Response`` enum /// - ``State`` - Represents the outcome status (OK, NO, or BAD) @@ -52,7 +52,7 @@ import struct NIO.ByteBuffer public struct TaggedResponse: Hashable, Sendable { /// The tag of the command that led to this response. /// - /// This is the same tag that appeared in the original client command, allowing the client + /// The same tag that appeared in the original client command, allowing the client /// to correlate the response with its request. The tag uniquely identifies the command within /// the connection session. public var tag: String diff --git a/Sources/NIOIMAPCore/Grammar/Response/TaggedResponseState.swift b/Sources/NIOIMAPCore/Grammar/Response/TaggedResponseState.swift index be4b22f7..7b2e6375 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/TaggedResponseState.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/TaggedResponseState.swift @@ -40,7 +40,7 @@ extension TaggedResponse { /// The command executed successfully. /// /// An OK status indicates the server has completed the command without error. The associated - /// ``ResponseText`` may contain optional status codes (e.g., ``ResponseTextCode/uidNext(_:)``) + /// ``ResponseText`` may contain optional status codes (for example, ``ResponseTextCode/uidNext(_:)``) /// with additional information about the command result. This is the expected outcome for most /// successful commands. /// @@ -50,7 +50,7 @@ extension TaggedResponse { /// S: A001 OK [UIDVALIDITY 3] SELECT completed /// ``` /// - /// This line is wrapped as ``State/ok(_:)`` with a ``ResponseText`` containing code + /// The line is wrapped as ``State/ok(_:)`` with a ``ResponseText`` containing code /// ``ResponseTextCode/uidValidity(_:)`` and text "`SELECT` completed". /// /// - SeeAlso: [RFC 3501 Section 7.1.2.1](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.1) @@ -60,7 +60,7 @@ extension TaggedResponse { /// /// A NO status indicates the server understood the command syntax but declined to execute it /// for logical or protocol reasons. The associated ``ResponseText`` often includes a structured - /// status code (e.g., ``ResponseTextCode/cannot``, ``ResponseTextCode/tryCreate``, or + /// status code (for example, ``ResponseTextCode/cannot``, ``ResponseTextCode/tryCreate``, or /// ``ResponseTextCode/overQuota``) explaining the reason for rejection. This is not a protocol /// error; the client may retry with different parameters. /// @@ -70,7 +70,7 @@ extension TaggedResponse { /// S: A002 NO [TRYCREATE] APPEND failed - mailbox does not exist /// ``` /// - /// This line is wrapped as ``State/no(_:)`` with a ``ResponseText`` containing code + /// The line is wrapped as ``State/no(_:)`` with a ``ResponseText`` containing code /// ``ResponseTextCode/tryCreate`` and text "`APPEND` failed - mailbox does not exist". /// /// - SeeAlso: [RFC 3501 Section 7.1.2.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.2) @@ -89,7 +89,7 @@ extension TaggedResponse { /// S: A003 BAD Invalid command syntax /// ``` /// - /// This line is wrapped as ``State/bad(_:)`` with a ``ResponseText`` containing text + /// The line is wrapped as ``State/bad(_:)`` with a ``ResponseText`` containing text /// "Invalid command syntax". /// /// - SeeAlso: [RFC 3501 Section 7.1.2.3](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.3) diff --git a/Sources/NIOIMAPCore/Grammar/Response/UntaggedResponseState.swift b/Sources/NIOIMAPCore/Grammar/Response/UntaggedResponseState.swift index c13f28f6..f3dd2a2b 100644 --- a/Sources/NIOIMAPCore/Grammar/Response/UntaggedResponseState.swift +++ b/Sources/NIOIMAPCore/Grammar/Response/UntaggedResponseState.swift @@ -50,7 +50,7 @@ public enum UntaggedStatus: Hashable, Sendable { /// S: * OK [CAPABILITY IMAP4rev1 STARTTLS LOGIN] server ready /// ``` /// - /// This line is wrapped as ``ok(_:)`` with a ``ResponseText`` containing the server's capabilities + /// The line is wrapped as ``ok(_:)`` with a ``ResponseText`` containing the server's capabilities /// and a ready message. This is typically the first response received after connecting. /// /// - SeeAlso: [RFC 3501 Section 7.1.2.1](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.1) @@ -69,7 +69,7 @@ public enum UntaggedStatus: Hashable, Sendable { /// S: * NO [ALERT] Server disk is low on space /// ``` /// - /// This line is wrapped as ``no(_:)`` with a ``ResponseText`` containing code + /// The line is wrapped as ``no(_:)`` with a ``ResponseText`` containing code /// ``ResponseTextCode/alert`` and warning text about disk space. /// /// - SeeAlso: [RFC 3501 Section 7.1.2.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.2) @@ -89,7 +89,7 @@ public enum UntaggedStatus: Hashable, Sendable { /// S: * BAD Unexpected character in message sequence /// ``` /// - /// This line is wrapped as ``bad(_:)`` with a ``ResponseText`` describing the protocol error. + /// The line is wrapped as ``bad(_:)`` with a ``ResponseText`` describing the protocol error. /// /// - SeeAlso: [RFC 3501 Section 7.1.2.3](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.3) case bad(ResponseText) @@ -98,7 +98,7 @@ public enum UntaggedStatus: Hashable, Sendable { /// /// The `PREAUTH` response is always untagged and is one of three possible greetings at connection /// startup (along with `OK` and `BYE`). It indicates that the connection has already been - /// authenticated through external means (e.g., TLS client certificate verification), so no + /// authenticated through external means (for example, TLS client certificate verification), so no /// `LOGIN` command is needed. After `PREAUTH`, the client is in the authenticated state and can /// access mailboxes. /// @@ -108,7 +108,7 @@ public enum UntaggedStatus: Hashable, Sendable { /// S: * PREAUTH [CAPABILITY IMAP4rev1 SELECT CREATE] already authenticated /// ``` /// - /// This line is wrapped as ``preauth(_:)`` with a ``ResponseText`` indicating the client is + /// The line is wrapped as ``preauth(_:)`` with a ``ResponseText`` indicating the client is /// already authenticated and listing available capabilities. /// /// - SeeAlso: [RFC 3501 Section 7.1.2.4](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.4) @@ -127,7 +127,7 @@ public enum UntaggedStatus: Hashable, Sendable { /// S: * BYE [UNAVAILABLE] Server maintenance in progress, please reconnect later /// ``` /// - /// This line is wrapped as ``bye(_:)`` with a ``ResponseText`` containing code + /// The line is wrapped as ``bye(_:)`` with a ``ResponseText`` containing code /// ``ResponseTextCode/unavailable`` and an explanation of why the connection is closing. /// /// - SeeAlso: [RFC 3501 Section 7.1.2.5](https://datatracker.ietf.org/doc/html/rfc3501#section-7.1.2.5) diff --git a/Sources/NIOIMAPCore/Grammar/ReturnOption.swift b/Sources/NIOIMAPCore/Grammar/ReturnOption.swift index ac682b3b..509c8cd0 100644 --- a/Sources/NIOIMAPCore/Grammar/ReturnOption.swift +++ b/Sources/NIOIMAPCore/Grammar/ReturnOption.swift @@ -38,7 +38,7 @@ import struct NIO.ByteBuffer /// `STATUS` responses are ``Response/untagged(_:)`` with ``ResponsePayload/mailboxData(_:)`` containing /// ``MailboxData/status(_:_:)`` variants. /// -/// ## Related Types +/// ## Related types /// /// Return options are used with the ``Command/list(_:reference:_:_:)`` command. /// See ``MailboxAttribute`` for the attributes returned in status responses. @@ -47,13 +47,13 @@ import struct NIO.ByteBuffer public enum ReturnOption: Hashable, Sendable { /// The `SUBSCRIBED` return option causes `LIST` to return subscription state for all matching mailboxes. /// - /// This is used with the ``Command/list(_:reference:_:_:)`` command to include subscription information + /// Used with the ``Command/list(_:reference:_:_:)`` command to include subscription information /// in the `LIST` responses. From [RFC 5819 Section 2](https://datatracker.ietf.org/doc/html/rfc5819#section-2). case subscribed /// The `CHILDREN` return option requests mailbox child information. /// - /// This instructs the server to return information about which mailboxes have children + /// Instructs the server to return information about which mailboxes have children /// (subfolders). The standard mailbox attributes `\HasChildren` and `\HasNoChildren` /// provide this information. From [RFC 3501 Section 7.2.2](https://datatracker.ietf.org/doc/html/rfc3501#section-7.2.2). case children @@ -62,13 +62,13 @@ public enum ReturnOption: Hashable, Sendable { /// /// When this option is specified, the server MUST return untagged `STATUS` responses /// in addition to `LIST` responses for each matching mailbox. The specified attributes - /// determine what status data is returned (e.g., `MESSAGES`, `UNSEEN`, `UIDVALIDITY`). + /// determine what status data is returned (for example, `MESSAGES`, `UNSEEN`, or `UIDVALIDITY`). /// From [RFC 5819 Section 2.1](https://datatracker.ietf.org/doc/html/rfc5819#section-2.1). case statusOption([MailboxAttribute]) /// The `SPECIAL-USE` return option requests only mailboxes with special-use attributes. /// - /// This filters `LIST` results to return only mailboxes marked with special-use attributes + /// Filters `LIST` results to return only mailboxes marked with special-use attributes /// like `\All`, `\Archive`, `\Drafts`, `\Flagged`, `\Junk`, `\Sent`, or `\Trash`. /// From [RFC 6154 Section 3](https://datatracker.ietf.org/doc/html/rfc6154#section-3). case specialUse diff --git a/Sources/NIOIMAPCore/Grammar/RumpAuthenticatedURL.swift b/Sources/NIOIMAPCore/Grammar/RumpAuthenticatedURL.swift index a8be2b0f..ea9f4525 100644 --- a/Sources/NIOIMAPCore/Grammar/RumpAuthenticatedURL.swift +++ b/Sources/NIOIMAPCore/Grammar/RumpAuthenticatedURL.swift @@ -18,7 +18,7 @@ import struct NIO.ByteBuffer /// /// A ``RumpAuthenticatedURL`` combines a complete message URL on a network-accessible server /// (``NetworkMessagePath``) with URLAUTH authorization information (``AuthenticatedURLRump``). -/// This represents a URL that can be resolved to fetch message content with proper authorization. +/// Represents a URL that can be resolved to fetch message content with proper authorization. /// /// The "rump" term refers to the URL portion used for token generation and verification in /// RFC 4467. In URLAUTH processing: @@ -54,7 +54,7 @@ import struct NIO.ByteBuffer /// The server converts the client's "rump URL" (without mechanism and token) into a complete URL /// by appending `:internal:`. /// -/// ## Related Types +/// ## Related types /// /// - ``NetworkMessagePath`` provides the server and message location /// - ``AuthenticatedURLRump`` provides expiration and access information diff --git a/Sources/NIOIMAPCore/Grammar/RumpURLAndMechanism.swift b/Sources/NIOIMAPCore/Grammar/RumpURLAndMechanism.swift index cae666af..fd865c4b 100644 --- a/Sources/NIOIMAPCore/Grammar/RumpURLAndMechanism.swift +++ b/Sources/NIOIMAPCore/Grammar/RumpURLAndMechanism.swift @@ -43,9 +43,9 @@ import struct NIO.ByteBuffer /// ## RFC 4467 Context /// /// According to RFC 4467 Section 5, the GENURLAUTH command accepts "one or more URL/mechanism pairs". -/// This type represents one such pair: the rump URL and the corresponding mechanism. +/// Represents one such pair: the rump URL and the corresponding mechanism. /// -/// ## Related Types +/// ## Related types /// /// - ``URLAuthenticationMechanism`` specifies the token generation algorithm /// - ``AuthenticatedURLRump`` contains the EXPIRE and ACCESS components @@ -56,7 +56,7 @@ import struct NIO.ByteBuffer public struct RumpURLAndMechanism: Hashable, Sendable { /// The IMAP URL without the mechanism and token components. /// - /// This is the complete URL including all components except the final `:mechanism:token` portion. + /// The complete URL including all components except the final `:mechanism:token` portion. /// It includes the server, mailbox, UID, optional section, optional byte range, expiration, /// and access identifier. public var urlRump: ByteBuffer diff --git a/Sources/NIOIMAPCore/Grammar/Search/SearchKey.swift b/Sources/NIOIMAPCore/Grammar/Search/SearchKey.swift index 26b3ec14..ebeac2e8 100644 --- a/Sources/NIOIMAPCore/Grammar/Search/SearchKey.swift +++ b/Sources/NIOIMAPCore/Grammar/Search/SearchKey.swift @@ -45,7 +45,7 @@ import struct NIO.ByteBuffer /// /// The ``not(_:)`` case with ``seen`` case matches messages that are not deleted and have been seen. /// -/// ## Related Types +/// ## Related types /// /// - ``SearchReturnOption``: Options controlling the format of search results /// - ``Command/search(key:charset:returnOptions:)`` and ``Command/uidSearch(key:charset:returnOptions:)`` commands that perform searches @@ -55,7 +55,7 @@ import struct NIO.ByteBuffer public indirect enum SearchKey: Hashable, Sendable { /// Matches all messages in the mailbox. /// - /// This is the default initial key for combining multiple search criteria with `AND` logic. + /// The default initial key for combining multiple search criteria with `AND` logic. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case all @@ -79,13 +79,13 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages with the `\Recent` flag set but not the `\Seen` flag. /// - /// This is functionally equivalent to the search key combination `(RECENT UNSEEN)`. + /// Functionally equivalent to the search key combination `(RECENT UNSEEN)`. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case new /// Matches messages without the `\Recent` flag set. /// - /// This is functionally equivalent to `NOT RECENT`, as opposed to ``new`` (which is "NOT NEW"). + /// Functionally equivalent to `NOT RECENT`, as opposed to ``new`` (which is "NOT NEW"). /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case old @@ -103,25 +103,25 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages without the `\Answered` flag set. /// - /// This is the negation of ``answered``. + /// The negation of ``answered``. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case unanswered /// Matches messages without the `\Deleted` flag set. /// - /// This is the negation of ``deleted``. + /// The negation of ``deleted``. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case undeleted /// Matches messages without the `\Flagged` flag set. /// - /// This is the negation of ``flagged``. + /// The negation of ``flagged``. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case unflagged /// Matches messages without the `\Seen` flag set. /// - /// This is the negation of ``seen``. + /// The negation of ``seen``. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case unseen @@ -133,7 +133,7 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages without the `\Draft` flag set. /// - /// This is the negation of ``draft``. + /// The negation of ``draft``. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case undraft @@ -193,7 +193,7 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages containing the specified string in either the header or body of the message. /// - /// This performs a broad search across the entire message content. + /// Performs a broad search across the entire message content. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case text(ByteBuffer) @@ -205,7 +205,7 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages without the specified keyword flag set. /// - /// This is the negation of ``keyword(_:)``. + /// The negation of ``keyword(_:)``. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case unkeyword(Flag.Keyword) @@ -224,31 +224,31 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages that do not match the specified search key. /// - /// This negates the given search key. Search keys are combined recursively using this case. + /// Negates the given search key. Search keys are combined recursively using this case. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case not(SearchKey) /// Matches messages that match either of the two specified search keys. /// - /// This is a logical `OR` operation between two search keys. + /// A logical `OR` operation between two search keys. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case or(SearchKey, SearchKey) /// Matches messages whose RFC 2822 Date header (disregarding time and timezone) is earlier than the specified date. /// - /// This differs from ``before(_:)`` which uses the message’s internal date. `SENTBEFORE` uses the message’s + /// Differs from ``before(_:)`` which uses the message’s internal date. `SENTBEFORE` uses the message’s /// Date: header field instead. From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case sentBefore(IMAPCalendarDay) /// Matches messages whose RFC 2822 Date header (disregarding time and timezone) is exactly the specified date. /// - /// This differs from ``on(_:)`` which uses the message’s internal date. `SENTON` uses the message’s + /// Differs from ``on(_:)`` which uses the message’s internal date. `SENTON` uses the message’s /// Date: header field instead. From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case sentOn(IMAPCalendarDay) /// Matches messages whose RFC 2822 Date header (disregarding time and timezone) is on or later than the specified date. /// - /// This differs from ``since(_:)`` which uses the message’s internal date. `SENTSINCE` uses the message’s + /// Differs from ``since(_:)`` which uses the message’s internal date. `SENTSINCE` uses the message’s /// Date: header field instead. From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case sentSince(IMAPCalendarDay) @@ -267,13 +267,13 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages with UIDs after the specified UID. /// - /// This is an extension search key that references UIDs relative to the last `SEARCH` result. + /// An extension search key that references UIDs relative to the last `SEARCH` result. /// From [RFC 5182](https://datatracker.ietf.org/doc/html/rfc5182). case uidAfter(LastCommandMessageID) /// Matches messages with UIDs before the specified UID. /// - /// This is an extension search key that references UIDs relative to the last `SEARCH` result. + /// An extension search key that references UIDs relative to the last `SEARCH` result. /// From [RFC 5182](https://datatracker.ietf.org/doc/html/rfc5182). case uidBefore(LastCommandMessageID) @@ -286,7 +286,7 @@ public indirect enum SearchKey: Hashable, Sendable { /// Matches messages that match all of the given search keys. /// - /// This is a logical `AND` operation combining all search keys in the array. + /// A logical `AND` operation combining all search keys in the array. /// An empty array matches no messages. /// From [RFC 3501 Section 6.4.4](https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.4). case and([SearchKey]) @@ -305,7 +305,7 @@ public indirect enum SearchKey: Hashable, Sendable { /// References a server-side saved filter by name. /// - /// This allows searching using pre-defined server-side filters, identified by name. + /// Allows searching using pre-defined server-side filters, identified by name. /// From [RFC 5466](https://datatracker.ietf.org/doc/html/rfc5466). case filter(String) diff --git a/Sources/NIOIMAPCore/Grammar/Search/SearchModificationSequence.swift b/Sources/NIOIMAPCore/Grammar/Search/SearchModificationSequence.swift index 938b63f9..539d0d20 100644 --- a/Sources/NIOIMAPCore/Grammar/Search/SearchModificationSequence.swift +++ b/Sources/NIOIMAPCore/Grammar/Search/SearchModificationSequence.swift @@ -44,7 +44,7 @@ import struct OrderedCollections.OrderedDictionary public struct SearchModificationSequence: Hashable, Sendable { /// Extension-specific entry attributes for future CONDSTORE enhancements. /// - /// This dictionary may contain additional entry attributes defined by future IMAP extensions. + /// May contain additional entry attributes defined by future IMAP extensions. /// For basic MODSEQ searches (RFC 7162), this is typically empty. public var extensions: OrderedDictionary diff --git a/Sources/NIOIMAPCore/Grammar/Search/SearchReturnData.swift b/Sources/NIOIMAPCore/Grammar/Search/SearchReturnData.swift index e1bae0a7..7684209f 100644 --- a/Sources/NIOIMAPCore/Grammar/Search/SearchReturnData.swift +++ b/Sources/NIOIMAPCore/Grammar/Search/SearchReturnData.swift @@ -22,7 +22,7 @@ import struct NIO.ByteBuffer /// /// **Requires server capability:** ``Capability/extendedSearch`` /// -/// The ESEARCH response can include multiple data elements (e.g., both `MIN` and `COUNT`), and clients should handle +/// The ESEARCH response can include multiple data elements (for example, both `MIN` and `COUNT`), and clients should handle /// each independently. Some result options (like ``count(_:)``) are always present, while others (like ``min(_:)`` /// and ``max(_:)``) are omitted if the search returns no matches. /// @@ -102,7 +102,7 @@ public enum SearchReturnData: Hashable, Sendable { /// A server extension result option not defined in this library. /// - /// This case captures future ESEARCH result data defined by extensions, allowing + /// Captures future ESEARCH result data defined by extensions, allowing /// forward compatibility with new IMAP capabilities without requiring library updates. case dataExtension(KeyValue) } diff --git a/Sources/NIOIMAPCore/Grammar/Search/SearchReturnOption.swift b/Sources/NIOIMAPCore/Grammar/Search/SearchReturnOption.swift index 27071694..96640d96 100644 --- a/Sources/NIOIMAPCore/Grammar/Search/SearchReturnOption.swift +++ b/Sources/NIOIMAPCore/Grammar/Search/SearchReturnOption.swift @@ -54,7 +54,7 @@ public enum SearchReturnOption: Hashable, Sendable { /// Return all message numbers/UIDs that satisfies the search criteria in sequence-set syntax. /// /// Unlike standard `SEARCH` responses which use space-separated lists, results are returned - /// as a compact sequence-set representation (e.g., `2,10:11`) that can be used directly + /// as a compact sequence-set representation (for example, `2,10:11`) that can be used directly /// in subsequent commands. If the search returns no matches, the server MUST NOT include /// this option in the response. /// @@ -80,7 +80,7 @@ public enum SearchReturnOption: Hashable, Sendable { /// Request a subset of the results using pagination. /// - /// This option is part of the PARTIAL extension for paginated search results. When specified, + /// Part of the PARTIAL extension for paginated search results. When specified, /// the server returns only the requested range of matching messages rather than all results, /// reducing bandwidth and server processing time. /// @@ -89,7 +89,7 @@ public enum SearchReturnOption: Hashable, Sendable { /// A server extension result option not defined in this library. /// - /// This case captures future ESEARCH result options defined by extensions, allowing + /// Captures future ESEARCH result options defined by extensions, allowing /// forward compatibility with new IMAP capabilities without requiring library updates. case optionExtension(KeyValue) } diff --git a/Sources/NIOIMAPCore/Grammar/SectionSpec.swift b/Sources/NIOIMAPCore/Grammar/SectionSpec.swift index ada25a75..84eb531e 100644 --- a/Sources/NIOIMAPCore/Grammar/SectionSpec.swift +++ b/Sources/NIOIMAPCore/Grammar/SectionSpec.swift @@ -38,7 +38,7 @@ public struct SectionSpecifier: Hashable, Sendable { /// The part of the body. public let part: Part - /// The type of section, e.g. `HEADER`. + /// The type of section, for example `HEADER`. public let kind: Kind /// Creates a new *complete* `SectionSpecifier`. @@ -47,7 +47,7 @@ public struct SectionSpecifier: Hashable, Sendable { /// See the documentation for ``SectionSpecifier/Kind`` for more details. /// /// - parameter part: The part of the body. Can only be empty if `kind` is not `.MIMEHeader`. - /// - parameter kind: The type of section, e.g. *HEADER*. Defaults to `.complete`. + /// - parameter kind: The type of section, for example `HEADER`. Defaults to `.complete`. public init(part: Part = .init([]), kind: Kind = .complete) { if part.array.count == 0 { precondition(kind != .MIMEHeader, "Cannot use MIME with an empty section part") @@ -58,7 +58,7 @@ public struct SectionSpecifier: Hashable, Sendable { } extension SectionSpecifier { - /// Corresponds to no specifier, i.e. the complete message (including its headers). + /// Corresponds to no specifier, that is, the complete message (including its headers). public static let complete = SectionSpecifier(kind: .complete) /// `Header` -- RFC 2822 header of the message @@ -110,7 +110,7 @@ extension SectionSpecifier: CustomDebugStringConvertible { extension SectionSpecifier { /// Specifies a particular body section. /// - /// This corresponds to the part number mentioned in RFC 3501 section 6.4.5. + /// Corresponds to the part number mentioned in RFC 3501 section 6.4.5. /// /// Examples are `1`, `4.1`, and `4.2.2.1`. public struct Part: Hashable, ExpressibleByArrayLiteral, Sendable { @@ -145,33 +145,33 @@ extension SectionSpecifier { /// * `.header` / `HEADER` (and by extension `.headerFields` and `.headerFieldsNot`) /// * `.text` / `TEXT` /// - /// For other parts (i.e. non-`message/rfc822` and not the message itself) these are valid: + /// For other parts (that is, non-`message/rfc822` and not the message itself) these are valid: /// * `.complete` (the part without its MIME header) /// * `.MIMEHeader` / `MIME` (the MIME header) public enum Kind: Hashable, Sendable { - /// A section specifier that ends in a part number, e.g. `4.2.2.1`. + /// A section specifier that ends in a part number, for example `4.2.2.1`. /// /// If the numeric part refers to the complete message or a `message/rfc822` part, this /// will refer to that _complete_ message. /// /// For any other part (single- or multi-part), it will refer to that parts - /// content, i.e. it will _not_ include any of the MIME headers of that part. + /// content, that is, it will _not_ include any of the MIME headers of that part. case complete /// If the numeric part refers to the complete message or a `message/rfc822` part, this /// will refer to that message’s headers. case header - /// The specified fields, corresponding to e.g. `4.2.HEADER.FIELDS (SUBJECT)`. + /// The specified fields, corresponding to, for example, `4.2.HEADER.FIELDS (SUBJECT)`. case headerFields([String]) - /// All except the specified fields, corresponding to e.g. `4.2.HEADER.FIELDS.NOT (SUBJECT)`. + /// All except the specified fields, corresponding to, for example, `4.2.HEADER.FIELDS.NOT (SUBJECT)`. case headerFieldsNot([String]) - /// MIME IMB header, corresponding to e.g. `4.2.MIME`. + /// MIME IMB header, corresponding to, for example, `4.2.MIME`. /// - /// This is only valid for a part that is _not_ a `message/rfc822` part. And in those cases, + /// Valid only for a part that is _not_ a `message/rfc822` part. And in those cases, /// this refers to the MIME header of that (single- or multi-) part. case MIMEHeader - /// Text body without header, corresponding to e.g. `4.2.TEXT`. + /// Text body without header, corresponding to, for example, `4.2.TEXT`. /// - /// This is only valid for a part that’s a `message/rfc822` part, e.g. the complete message. + /// Valid only for a part that’s a `message/rfc822` part (for example, the complete message). case text } } @@ -304,7 +304,7 @@ extension SectionSpecifier.Kind: Comparable { extension SectionSpecifier.Part { /// Returns a `Part` containing all but the initial part number. /// - /// If the `Part` is empty (i.e. the complete message), it returns the empty + /// If the `Part` is empty (that is, the complete message), it returns the empty /// `Part` / complete message specifier. public func dropFirst() -> SectionSpecifier.Part { SectionSpecifier.Part(Array(self.array.dropFirst())) @@ -312,7 +312,7 @@ extension SectionSpecifier.Part { /// Returns a `Part` containing all but the last part number. /// - /// If the `Part` is empty (i.e. the complete message), it returns the empty + /// If the `Part` is empty (that is, the complete message), it returns the empty /// `Part` / complete message specifier. public func dropLast() -> SectionSpecifier.Part { SectionSpecifier.Part(Array(self.array.dropLast())) @@ -334,7 +334,7 @@ extension SectionSpecifier.Part { return zip(a, b).allSatisfy { $0.0 == $0.1 } } - /// Returns `true` if the `other` part is a directly below this `Part`, e.g. `2.1` is a child of `2`, and `2` is a child of the top-level part. Returns `false` otherwise. + /// Returns `true` if the `other` part is a directly below this `Part`, for example `2.1` is a child of `2`, and `2` is a child of the top-level part. Returns `false` otherwise. public func isChildPart(of other: SectionSpecifier.Part) -> Bool { guard self.array.count == other.array.count + 1 diff --git a/Sources/NIOIMAPCore/Grammar/Sequence/SequenceNumber.swift b/Sources/NIOIMAPCore/Grammar/Sequence/SequenceNumber.swift index 3c30af39..8897c338 100644 --- a/Sources/NIOIMAPCore/Grammar/Sequence/SequenceNumber.swift +++ b/Sources/NIOIMAPCore/Grammar/Sequence/SequenceNumber.swift @@ -29,7 +29,7 @@ /// See [RFC 3501 Section 2.3.1.2](https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.1.2) /// for details on message sequence numbers. /// -/// ## Related Types +/// ## Related types /// /// Use ``UID`` to reference messages by a stable, session-independent identifier. /// Use ``MessageIdentifierSet`` or ``MessageIdentifierRange`` to represent collections of sequence numbers. diff --git a/Sources/NIOIMAPCore/Grammar/Sort/SortCriterion.swift b/Sources/NIOIMAPCore/Grammar/Sort/SortCriterion.swift index cbfa713c..d987f106 100644 --- a/Sources/NIOIMAPCore/Grammar/Sort/SortCriterion.swift +++ b/Sources/NIOIMAPCore/Grammar/Sort/SortCriterion.swift @@ -39,7 +39,7 @@ /// S: A002 OK SORT completed /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``Command/sort(criteria:charset:key:returnOptions:)`` and ``Command/uidSort(criteria:charset:key:returnOptions:)``: Commands that perform sorting /// - ``SearchKey``: Criteria for filtering messages before sorting @@ -79,14 +79,14 @@ public enum SortCriterion: Hashable, Sendable { /// Sort by the size of the message in octets. /// - /// This corresponds to the `RFC822.SIZE` message attribute. + /// Corresponds to the `RFC822.SIZE` message attribute. /// From [RFC 5256 Section 2.2](https://datatracker.ietf.org/doc/html/rfc5256#section-2.2). case size /// Sort by the base subject text. /// /// The subject is processed according to [RFC 5256 Section 2.1](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1) - /// to strip reply prefixes (e.g., "Re:", "Fwd:") and normalize whitespace before comparison. + /// to strip reply prefixes (for example, "Re:" or "Fwd:") and normalize whitespace before comparison. case subject /// Sort by the first address in the `To` header. diff --git a/Sources/NIOIMAPCore/Grammar/StoreModifier.swift b/Sources/NIOIMAPCore/Grammar/StoreModifier.swift index 222f5f6a..5b85bd3e 100644 --- a/Sources/NIOIMAPCore/Grammar/StoreModifier.swift +++ b/Sources/NIOIMAPCore/Grammar/StoreModifier.swift @@ -37,11 +37,11 @@ public enum StoreModifier: Hashable, Sendable { /// Only perform the store operation if the message's modification sequence is unchanged (RFC 7162 `CONDSTORE` extension). /// - /// This modifier implements optimistic concurrency control. The server compares the message's current mod-sequence - /// with the specified value. If the message's mod-sequence is equal to or less than the specified value, the STORE + /// Implements optimistic concurrency control. The server compares the message's current mod-sequence + /// with the specified value. If the message's mod-sequence is equal to or less than the specified value, the `STORE` /// operation succeeds. Otherwise, the operation is rejected, indicating that another client has modified the message. /// - /// This prevents "lost updates" where one client's changes could overwrite another client's changes in a + /// Prevents "lost updates" where one client's changes could overwrite another client's changes in a /// multimailbox environment. /// /// **Requires server capability:** ``Capability/condStore`` @@ -51,7 +51,7 @@ public enum StoreModifier: Hashable, Sendable { /// A server extension modifier not defined in this library. /// - /// This case captures future `STORE` modifiers defined by extensions, allowing forward compatibility + /// Captures future `STORE` modifiers defined by extensions, allowing forward compatibility /// with new IMAP capabilities without requiring library updates. case other(KeyValue) } diff --git a/Sources/NIOIMAPCore/Grammar/Tagged/ParameterValue.swift b/Sources/NIOIMAPCore/Grammar/Tagged/ParameterValue.swift index 005f15f2..00885b16 100644 --- a/Sources/NIOIMAPCore/Grammar/Tagged/ParameterValue.swift +++ b/Sources/NIOIMAPCore/Grammar/Tagged/ParameterValue.swift @@ -16,7 +16,7 @@ import struct NIO.ByteBuffer /// A parameter value that can be a sequence reference or a composite value array. /// -/// This type serves as a catch-all for future extension parameter values in the RFC 4466 extension mechanism. +/// Serves as a catch-all for future extension parameter values in the RFC 4466 extension mechanism. /// It supports both `$` references to the last command result and arrays of string components for complex /// extension data structures. /// diff --git a/Sources/NIOIMAPCore/Grammar/UID/IUID.swift b/Sources/NIOIMAPCore/Grammar/UID/IUID.swift index 1be0a1fc..7e606449 100644 --- a/Sources/NIOIMAPCore/Grammar/UID/IUID.swift +++ b/Sources/NIOIMAPCore/Grammar/UID/IUID.swift @@ -29,14 +29,14 @@ public struct InvalidUID: Error {} /// - `;UID=` (in relative paths or CATENATE operations) /// - `/;UID=` (in absolute message paths) /// -/// This type is primarily used internally for IMAP URL constructs, URLAUTH-authorized URL +/// Primarily used internally for IMAP URL constructs, URLAUTH-authorized URL /// verification, and CATENATE append operations that reference existing messages on the server. /// /// See [RFC 4467](https://datatracker.ietf.org/doc/html/rfc4467) (URLAUTH Extension) /// and [RFC 4469](https://datatracker.ietf.org/doc/html/rfc4469) (CATENATE Extension) /// for details on how IUIDs are used to reference message content. /// -/// ## Related Types +/// ## Related types /// /// - ``UID`` is the wrapped type containing the actual message identifier /// - ``MessagePath`` uses ``IUID`` for URL-style message identification diff --git a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifier.swift b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifier.swift index 3ad6b899..e697aa7f 100644 --- a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifier.swift +++ b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifier.swift @@ -30,7 +30,7 @@ /// See [RFC 3501](https://datatracker.ietf.org/doc/html/rfc3501) for details on message /// identifiers and their usage in IMAP commands and responses. /// -/// ## Related Types +/// ## Related types /// /// - ``MessageIdentifierRange`` represents a range of message identifiers. /// - ``MessageIdentifierSet`` represents a collection of message identifier ranges. @@ -87,7 +87,7 @@ extension MessageIdentifier { /// Either a ``UID`` or a ``SequenceNumber``, determined at runtime by command context. /// /// When parsing protocol messages, some values could represent either a ``UID`` or a -/// ``SequenceNumber`` depending on the command context (e.g., whether the command is prefixed +/// ``SequenceNumber`` depending on the command context (for example, whether the command is prefixed /// with `UID`). The `UnknownMessageIdentifier` type preserves the numeric value without /// committing to a specific type. /// diff --git a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierRange.swift b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierRange.swift index cda6347b..3ec341d1 100644 --- a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierRange.swift +++ b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierRange.swift @@ -18,7 +18,7 @@ import struct NIO.ByteBuffer /// /// A `MessageIdentifierRange` represents a contiguous sequence of message identifiers using /// lower and upper bounds. It wraps a native Swift `ClosedRange` and supports conversion -/// from partial ranges (e.g., `1...` or `...42`). +/// from partial ranges (for example, `1...` or `...42`). /// /// In IMAP wire format, ranges are encoded as `lower:upper`, where both bounds can be the /// special value `*` (representing `UInt32.max`, the maximum message identifier). @@ -43,7 +43,7 @@ import struct NIO.ByteBuffer /// These ranges are used in set-based commands like `FETCH 1:5`, `STORE 1,3:7 +FLAGS \Deleted`, /// and `COPY 1:* Archive`. /// -/// ## Related Types +/// ## Related types /// /// - ``MessageIdentifierSet`` contains an array of ranges to represent non-contiguous sets. /// - ``SequenceRange`` is a type alias for `MessageIdentifierRange`. diff --git a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSet.swift b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSet.swift index 12c2cf15..444b77be 100644 --- a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSet.swift +++ b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSet.swift @@ -49,10 +49,10 @@ import struct NIO.ByteBuffer /// let max = set.max() // Returns 20 /// ``` /// -/// This type conforms to `BidirectionalCollection` and `SetAlgebra`, allowing iteration, +/// Conforms to `BidirectionalCollection` and `SetAlgebra`, allowing iteration, /// queries, and set operations like `union`, `intersection`, and `isSubset`. /// -/// ## Related Types +/// ## Related types /// /// - ``MessageIdentifierRange`` represents a single contiguous range. /// - ``MessageIdentifierSetNonEmpty`` wraps a non-empty set for use in commands requiring at least one message. @@ -173,7 +173,7 @@ extension MessageIdentifierSet { // MARK: - extension MessageIdentifierSet { - /// Returns `true` if there are no gaps in the values, i.e. the set is non-sparse. + /// Returns `true` if there are no gaps in the values (that is, the set is non-sparse). /// /// For example: `5:10` is contiguous, but `5:6,8` is _not_. /// diff --git a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSetNonEmpty.swift b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSetNonEmpty.swift index 4dad4e18..7a4381b9 100644 --- a/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSetNonEmpty.swift +++ b/Sources/NIOIMAPCore/Grammar/UID/MessageIdentifierSetNonEmpty.swift @@ -14,7 +14,7 @@ /// A non-empty wrapper around ``MessageIdentifierSet`` guaranteeing at least one message identifier. /// -/// Many IMAP commands require a non-empty message set (e.g., `FETCH 1:5`, `STORE`, `COPY`, +/// Many IMAP commands require a non-empty message set (for example, `FETCH 1:5`, `STORE`, `COPY`, /// `EXPUNGE`). `MessageIdentifierSetNonEmpty` wraps a ``MessageIdentifierSet`` with a type-level /// guarantee that it contains at least one element. /// @@ -38,7 +38,7 @@ /// let max = all.max() // Returns UInt32.max /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``MessageIdentifierSet`` is the wrapped type (may be empty). /// - ``MessageIdentifierRange`` represents a single contiguous range. diff --git a/Sources/NIOIMAPCore/Grammar/UID/UID.swift b/Sources/NIOIMAPCore/Grammar/UID/UID.swift index 5b394bd4..28be27ae 100644 --- a/Sources/NIOIMAPCore/Grammar/UID/UID.swift +++ b/Sources/NIOIMAPCore/Grammar/UID/UID.swift @@ -32,7 +32,7 @@ /// See [RFC 3501 Section 2.3.1.1](https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.1.1) /// for details on unique identifier handling. /// -/// ## Related Types +/// ## Related types /// /// Use ``SequenceNumber`` to reference messages by their current position in the mailbox. /// Use ``MessageIdentifierSet`` or ``MessageIdentifierRange`` to represent collections of UIDs. diff --git a/Sources/NIOIMAPCore/Grammar/UID/UIDValidity.swift b/Sources/NIOIMAPCore/Grammar/UID/UIDValidity.swift index 340c19cb..c7aae1ef 100644 --- a/Sources/NIOIMAPCore/Grammar/UID/UIDValidity.swift +++ b/Sources/NIOIMAPCore/Grammar/UID/UIDValidity.swift @@ -27,7 +27,7 @@ /// See [RFC 3501 Section 2.3.1.1](https://datatracker.ietf.org/doc/html/rfc3501#section-2.3.1.1) /// for details on unique identifier validity. /// -/// ## Related Types +/// ## Related types /// /// Combine with ``UID`` to create persistent message identifiers: a (UID, UIDValidity) pair /// uniquely identifies a message across all sessions and mailbox reincarnations. diff --git a/Sources/NIOIMAPCore/Grammar/URLAuthenticationMechanism.swift b/Sources/NIOIMAPCore/Grammar/URLAuthenticationMechanism.swift index 03ab07b9..5907f5c7 100644 --- a/Sources/NIOIMAPCore/Grammar/URLAuthenticationMechanism.swift +++ b/Sources/NIOIMAPCore/Grammar/URLAuthenticationMechanism.swift @@ -48,7 +48,7 @@ /// // Represents: :internal:91354a473744909de610943775f92038 /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``AuthenticatedURLVerifier`` pairs the mechanism with a verification token /// - ``AuthenticatedURL`` combines the URL rump with verification details @@ -69,13 +69,13 @@ public struct URLAuthenticationMechanism: Hashable, Sendable { /// The mechanism name as a string. /// - /// This is the name that appears in the URLAUTH component (case may be normalized by the server). + /// The name that appears in the URLAUTH component (case may be normalized by the server). /// Common values include `"INTERNAL"` for the standard mechanism, but servers may support /// other mechanisms. internal let stringValue: String /// Creates a new mechanism by name. - /// - parameter stringValue: The mechanism name (e.g., "INTERNAL"). + /// - parameter stringValue: The mechanism name (for example, "INTERNAL"). public init(_ stringValue: String) { self.stringValue = stringValue } diff --git a/Sources/NIOIMAPCore/Grammar/URLCommand.swift b/Sources/NIOIMAPCore/Grammar/URLCommand.swift index fe300159..4375de62 100644 --- a/Sources/NIOIMAPCore/Grammar/URLCommand.swift +++ b/Sources/NIOIMAPCore/Grammar/URLCommand.swift @@ -20,7 +20,7 @@ /// /// URL commands appear after the mailbox portion of an IMAP URL path. /// -/// ### Command Types +/// ### Command types /// /// - ``messageList(_:)``: Search for messages matching specific criteria (` `SEARCH` or `` `SELECT` `` semantics) /// - ``fetch(path:authenticatedURL:)``: Fetch message content from a specific message location @@ -49,7 +49,7 @@ /// S: a001 OK URLFETCH completed /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``MessagePath`` specifies message location details /// - ``AuthenticatedURL`` provides URLAUTH verification for authorized access @@ -63,7 +63,7 @@ public enum URLCommand: Hashable, Sendable { /// A search query to identify messages matching specific criteria. /// /// When used in an IMAP URL, indicates that messages should be selected based on - /// search criteria (e.g., `UNSEEN`, `ALL`, `TEXT "search text"`). This effectively + /// search criteria (for example, `UNSEEN`, `ALL`, or `TEXT "search text"`). Effectively /// performs a `SEARCH` command within the specified mailbox. case messageList(EncodedSearchQuery) diff --git a/Sources/NIOIMAPCore/Grammar/URLFetchData.swift b/Sources/NIOIMAPCore/Grammar/URLFetchData.swift index 4571978b..ba835dac 100644 --- a/Sources/NIOIMAPCore/Grammar/URLFetchData.swift +++ b/Sources/NIOIMAPCore/Grammar/URLFetchData.swift @@ -47,7 +47,7 @@ import struct NIO.ByteBuffer /// imap://user@example.com/INBOX/;uid=20;section=1.2;urlauth=anonymous:internal:... /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``NetworkMessagePath`` represents the base URL before authorization /// - ``AuthenticatedURL`` provides URLAUTH verification for the URL @@ -59,14 +59,14 @@ import struct NIO.ByteBuffer public struct URLFetchData: Hashable, Sendable { /// The IMAP URL that was fetched. /// - /// This is the URL as submitted in the URLFETCH command, typically including + /// The URL as submitted in the URLFETCH command, typically including /// URLAUTH authorization information if the URL was authorized. public var url: ByteBuffer /// The message data associated with the URL, or `nil` if unavailable. /// /// When `nil`, indicates that the server could not retrieve the message data - /// (e.g., because the URL was invalid, authorization failed, or the message was deleted). + /// (for example, because the URL was invalid, authorization failed, or the message was deleted). /// When present, contains the message content (or partial content if the URL /// specified a section or byte range). public var data: ByteBuffer? diff --git a/Sources/NIOIMAPCore/Grammar/URLFetchType.swift b/Sources/NIOIMAPCore/Grammar/URLFetchType.swift index 6cbf4abc..33c6854b 100644 --- a/Sources/NIOIMAPCore/Grammar/URLFetchType.swift +++ b/Sources/NIOIMAPCore/Grammar/URLFetchType.swift @@ -14,7 +14,7 @@ /// Different ways to specify message data to fetch via IMAP URLs. /// -/// This enum provides flexible message fetch specifications for IMAP URLs (RFC 2192/5092) +/// Provides flexible message fetch specifications for IMAP URLs (RFC 2192/5092) /// and URLAUTH-authorized fetch operations (RFC 4467). Each case represents a different /// combination of message location components that can be specified in a URL, allowing /// for relative paths and partial URL information. @@ -22,7 +22,7 @@ /// The fetch type is used in ``URLCommand/fetch(path:authenticatedURL:)`` to specify /// exactly what message content should be retrieved. /// -/// ### Fetch Variants +/// ### Fetch variants /// /// The cases support different levels of path specification, from complete absolute paths /// (with mailbox reference and UID) to partial paths (UID only, section only, or byte range only). @@ -49,7 +49,7 @@ /// imap://user@example.com/INBOX/;partial=512.1024 /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``MessagePath`` provides complete message location with mailbox, UID, optional section, and range /// - ``MailboxUIDValidity`` identifies a mailbox with optional UID validity @@ -62,7 +62,7 @@ public enum URLFetchType: Hashable, Sendable { /// Complete message specification with mailbox reference, UID, optional section, and optional byte range. /// - /// This is the most explicit form, providing all location information in a single + /// The most explicit form, providing all location information in a single /// fully-qualified URL path. Useful for creating complete, standalone URLs. case refUidSectionPartial( ref: MailboxUIDValidity, @@ -73,7 +73,7 @@ public enum URLFetchType: Hashable, Sendable { /// Message specification with UID (and optional section and byte range) but no explicit mailbox. /// - /// Assumes the mailbox context is provided separately (e.g., by `SELECT`). Useful + /// Assumes the mailbox context is provided separately (for example, by `SELECT`). Useful /// for relative URLs within an already-selected mailbox. case uidSectionPartial(uid: IUID, section: URLMessageSection?, partial: MessagePath.ByteRange?) diff --git a/Sources/NIOIMAPCore/Grammar/URLMessageSection.swift b/Sources/NIOIMAPCore/Grammar/URLMessageSection.swift index bb9e737b..3fa8bed5 100644 --- a/Sources/NIOIMAPCore/Grammar/URLMessageSection.swift +++ b/Sources/NIOIMAPCore/Grammar/URLMessageSection.swift @@ -20,10 +20,10 @@ import struct NIO.ByteBuffer /// numeric notation. When used in IMAP URLs (RFC 2192/5092) and URLAUTH-authorized URLs (RFC 4467), /// section references are percent-encoded to ensure they contain only URL-safe characters. /// -/// This type wraps a percent-encoded section reference for use in IMAP URL construction. +/// Wraps a percent-encoded section reference for use in IMAP URL construction. /// It appears in URL paths as `;SECTION=
` (or `/;SECTION=
` in some contexts). /// -/// ### Section Reference Format +/// ### Section reference format /// /// Message sections use dot-separated numbers to reference structure parts: /// - `"1"` - First part of the message body @@ -56,7 +56,7 @@ import struct NIO.ByteBuffer /// S: * GENURLAUTH "imap://user@example.com/INBOX/;uid=20;section=1.2;urlauth=anonymous:internal:..." /// ``` /// -/// ## Related Types +/// ## Related types /// /// - ``EncodedSection`` wraps the percent-encoded section string /// - ``MessagePath`` includes an optional ``URLMessageSection`` diff --git a/Sources/NIOIMAPCore/Grammar/UseAttribute.swift b/Sources/NIOIMAPCore/Grammar/UseAttribute.swift index 921d14d2..5143e5aa 100644 --- a/Sources/NIOIMAPCore/Grammar/UseAttribute.swift +++ b/Sources/NIOIMAPCore/Grammar/UseAttribute.swift @@ -17,7 +17,7 @@ import struct NIO.ByteBuffer /// A special-use mailbox attribute from RFC 6154. /// /// The `SPECIAL-USE` extension allows servers to advertise the special purpose of certain mailboxes. -/// This helps clients automatically identify important mailboxes like Drafts, Sent, Trash, and Junk +/// Helps clients automatically identify important mailboxes like Drafts, Sent, Trash, and Junk /// without relying on localized mailbox names or user configuration. /// /// The attribute values are case-insensitive and are stored lowercase internally for comparison. @@ -38,7 +38,7 @@ public struct UseAttribute: Hashable, Sendable { /// Stores messages that have been marked as "important" for some reason. public static let flagged = Self("\\Flagged") - /// Stores messages deemed to be spam of junk mail, e.g. from a mailing list. + /// Stores messages deemed to be spam or junk mail, for example, from a mailing list. public static let junk = Self("\\Junk") /// Holds copies of messages that have been sent. @@ -50,7 +50,7 @@ public struct UseAttribute: Hashable, Sendable { internal let stringValue: String /// Creates a new `UseAttribute` from the raw `String`. Note that - /// usually it should be sufficient to just use the predefined attributes, e.g. `.drafts`. + /// usually it should be sufficient to just use the predefined attributes, for example `.drafts`. /// `rawValue` will be lowercased. public init(_ stringValue: String) { self.stringValue = stringValue @@ -74,7 +74,7 @@ extension UseAttribute { } extension String { - /// The raw value of the attribute, e.g. `\Trash`. Always lowercase.. + /// The raw value of the attribute, for example `\Trash`. Always lowercase. public init(_ other: UseAttribute) { self = other.stringValue } diff --git a/Sources/NIOIMAPCore/Grammar/UserInfo.swift b/Sources/NIOIMAPCore/Grammar/UserInfo.swift index fcd64a0f..c8c8e4f8 100644 --- a/Sources/NIOIMAPCore/Grammar/UserInfo.swift +++ b/Sources/NIOIMAPCore/Grammar/UserInfo.swift @@ -14,7 +14,7 @@ /// Optional user identification and/or authentication mechanism requirement for an IMAP server connection. /// -/// This type specifies which user context and/or which authentication mechanism should be used +/// Specifies which user context and/or which authentication mechanism should be used /// when connecting to an IMAP server. It appears in the server component of IMAP URLs /// (before the `@` symbol). At least one of ``encodedUser`` or ``authenticationMechanism`` must be present. /// @@ -46,7 +46,7 @@ /// /// The `owner@example.com` specifies who owns the mailbox access key that will authorize the URL. /// -/// ## Related Types +/// ## Related types /// /// See ``IMAPServer`` for the complete server specification, ``IMAPURLAuthenticationMechanism`` for /// authentication mechanism details, and ``EncodedUser`` for the percent-encoded user representation. diff --git a/Sources/NIOIMAPCore/IMAPDefaults.swift b/Sources/NIOIMAPCore/IMAPDefaults.swift index 770444a9..3be6a9dd 100644 --- a/Sources/NIOIMAPCore/IMAPDefaults.swift +++ b/Sources/NIOIMAPCore/IMAPDefaults.swift @@ -25,7 +25,7 @@ public struct IMAPDefaults { /// The maximum recommended line length for IMAP protocol messages. /// /// RFC 7162 Section 4 recommends that servers not send lines longer than 8192 bytes. - /// This is the maximum recommended length, though some implementations may enforce + /// The maximum recommended length, though some implementations may enforce /// stricter limits. /// /// - SeeAlso: [RFC 7162 Section 4](https://datatracker.ietf.org/doc/html/rfc7162#section-4) @@ -33,14 +33,14 @@ public struct IMAPDefaults { /// The default maximum size for protocol literals when no other limit is specified. /// - /// This is a conservative default (4KB) that allows reasonable literal sizes while + /// A conservative default (4KB) that allows reasonable literal sizes while /// preventing excessive memory allocation from malformed or malicious servers. Individual /// applications should adjust this based on their expected message sizes. public static let literalSizeLimit: Int = 4_096 /// The default maximum size for message body data when no other limit is specified. /// - /// This is set to the maximum possible value, allowing bodies of any size. Applications + /// Set to the maximum possible value, allowing bodies of any size. Applications /// that wish to limit body sizes should enforce their own limits when processing /// `BODY` fetch responses. public static let bodySizeLimit: Int = .max diff --git a/Sources/NIOIMAPCore/ModifiedUTF7.swift b/Sources/NIOIMAPCore/ModifiedUTF7.swift index 5454babe..2ee6d916 100644 --- a/Sources/NIOIMAPCore/ModifiedUTF7.swift +++ b/Sources/NIOIMAPCore/ModifiedUTF7.swift @@ -21,7 +21,7 @@ import struct NIO.ByteBuffer /// mailbox names must be transmitted as UTF-7 in the IMAP protocol, even when the client /// and server both support UTF-8. /// -/// ## Modified UTF-7 Rules +/// ## Modified UTF-7 rules /// /// The modified UTF-7 encoding replaces the standard UTF-7 "shift" characters: /// - Uses `&` (U+0026) instead of `+` to begin Base64 sequences @@ -51,7 +51,7 @@ public enum ModifiedUTF7 { /// Thrown when bytes cannot successfully roundtrip through encoding and decoding. /// - /// This typically indicates the encoded data is corrupted or uses invalid UTF-7 sequences. + /// Typically indicates the encoded data is corrupted or uses invalid UTF-7 sequences. public struct EncodingRoundtripError: Error { /// The buffer that failed to roundtrip. public var buffer: ByteBuffer @@ -59,7 +59,7 @@ public enum ModifiedUTF7 { /// Encodes a `String` into modified UTF-7 bytes for use as an IMAP mailbox name. /// - /// This function converts a Unicode string into modified UTF-7 format, where + /// Converts a Unicode string into modified UTF-7 format, where /// non-ASCII characters are represented using Base64 encoding with `&` as the /// escape character. /// @@ -113,7 +113,7 @@ public enum ModifiedUTF7 { /// Decodes a `ByteBuffer` containing UTF-7 bytes into a `String` /// - parameter buffer: The bytes to decode. /// - throws: An `OddByteCountError` if `buffer` contains an off number of bytes. - /// - returns: A `String` that can be used to e.g. display to a user. + /// - returns: A `String` that can be used to, for example, display to a user. static func decode(_ buffer: ByteBuffer) throws -> String { var string = "" string.reserveCapacity(buffer.readableBytes) diff --git a/Sources/NIOIMAPCore/NIOIMAPCore.docc/Commands.md b/Sources/NIOIMAPCore/NIOIMAPCore.docc/Commands.md index 3461be0a..9b9f99c1 100644 --- a/Sources/NIOIMAPCore/NIOIMAPCore.docc/Commands.md +++ b/Sources/NIOIMAPCore/NIOIMAPCore.docc/Commands.md @@ -1,6 +1,6 @@ # Commands -The IMAP protocol is built on a command-response model where clients send tagged commands to perform operations, and servers respond with updates and status. +Construct and send typed IMAP commands, from authentication and mailbox management to message retrieval and server extensions. ## Overview diff --git a/Sources/NIOIMAPCore/NIOIMAPCore.docc/GrammarTypes.md b/Sources/NIOIMAPCore/NIOIMAPCore.docc/GrammarTypes.md index da0616b1..0e4b1788 100644 --- a/Sources/NIOIMAPCore/NIOIMAPCore.docc/GrammarTypes.md +++ b/Sources/NIOIMAPCore/NIOIMAPCore.docc/GrammarTypes.md @@ -1,6 +1,6 @@ # Grammar Types -The complete type vocabulary of the IMAP protocol, organized by domain. +The complete vocabulary of IMAP protocol types, organized by domain for mailboxes, messages, flags, and more. ## Overview diff --git a/Sources/NIOIMAPCore/NIOIMAPCore.docc/NIOIMAPCore.md b/Sources/NIOIMAPCore/NIOIMAPCore.docc/NIOIMAPCore.md index d55a2f40..9eb7eb7b 100644 --- a/Sources/NIOIMAPCore/NIOIMAPCore.docc/NIOIMAPCore.md +++ b/Sources/NIOIMAPCore/NIOIMAPCore.docc/NIOIMAPCore.md @@ -1,12 +1,12 @@ # ``NIOIMAPCore`` -Type-safe parsing and encoding of IMAP4 protocol messages. +Parse and encode IMAP4rev1 protocol messages with type safety. ## Overview NIOIMAPCore is the foundation of the swift-nio-imap project. It provides comprehensive, type-safe parsing and encoding of IMAP4rev1 protocol messages as described in RFC 3501 and related RFCs. -This module is designed to be used as a building block for creating IMAP clients and servers. It handles the complexity of the IMAP wire protocol, converting between byte streams and strongly-typed Swift data structures. +Use this module as a building block for creating IMAP clients and servers. It handles the complexity of the IMAP wire protocol, converting between byte streams and strongly-typed Swift data structures. ### Key Features @@ -26,7 +26,7 @@ The IMAP protocol is text-based and involves continuous streams of commands and ### Example -Here's a simple example of parsing and encoding an IMAP response: +Here's an example of parsing and encoding an IMAP response: ```swift // Parse: "* 18 EXISTS" diff --git a/Sources/NIOIMAPCore/NIOIMAPCore.docc/ParsingAndEncoding.md b/Sources/NIOIMAPCore/NIOIMAPCore.docc/ParsingAndEncoding.md index eea30828..b6e0072b 100644 --- a/Sources/NIOIMAPCore/NIOIMAPCore.docc/ParsingAndEncoding.md +++ b/Sources/NIOIMAPCore/NIOIMAPCore.docc/ParsingAndEncoding.md @@ -1,6 +1,6 @@ # Parsing and Encoding -Parser and encoder infrastructure for IMAP protocol streams. +Parse IMAP server responses and encode client commands using these streaming parsers and encode buffers. ## Overview diff --git a/Sources/NIOIMAPCore/NIOIMAPCore.docc/ProtocolCore.md b/Sources/NIOIMAPCore/NIOIMAPCore.docc/ProtocolCore.md index b59dbe7f..0b7495c7 100644 --- a/Sources/NIOIMAPCore/NIOIMAPCore.docc/ProtocolCore.md +++ b/Sources/NIOIMAPCore/NIOIMAPCore.docc/ProtocolCore.md @@ -1,6 +1,6 @@ # Protocol Core -Essential types for the IMAP communication lifecycle. +The core types for IMAP client-server communication: commands, responses, capabilities, and authentication. ## Overview @@ -10,7 +10,7 @@ The protocol core encompasses the fundamental types exchanged between clients an ### Commands -Commands are what the client sends to the server to request actions or retrieve data. +Use these types to send commands to the server and request actions or retrieve data. - ``Command`` - ``CommandStreamPart`` @@ -19,7 +19,7 @@ Commands are what the client sends to the server to request actions or retrieve ### Responses -Responses are what the server sends back, ranging from simple confirmations to complex streaming data. +Use these types to handle the server's responses, from simple confirmations to complex streaming data. - ``Response`` - ``FetchResponse`` @@ -30,7 +30,7 @@ Responses are what the server sends back, ranging from simple confirmations to c ### Response Text -These types are used within response messages to convey status information and additional context. +These types appear within response messages and convey status information and additional context. - ``ResponseText`` - ``ResponseTextCode`` @@ -39,7 +39,7 @@ These types are used within response messages to convey status information and a ### Capabilities & Authentication -Types related to server capabilities and client authentication. +Discover server capabilities and authenticate with these types. - ``Capability`` - ``AuthenticationMechanism`` diff --git a/Sources/NIOIMAPCore/NIOIMAPCore.docc/Responses.md b/Sources/NIOIMAPCore/NIOIMAPCore.docc/Responses.md index 8c804477..73001fce 100644 --- a/Sources/NIOIMAPCore/NIOIMAPCore.docc/Responses.md +++ b/Sources/NIOIMAPCore/NIOIMAPCore.docc/Responses.md @@ -1,10 +1,11 @@ # Responses -Supporting types used when interpreting and handling server responses. +Interpret server response payloads and message data using these supporting types. ## Overview -When the server sends responses, these types help you interpret the data it contains. They organize the various kinds of response payloads and the information embedded within them. +When the server sends responses, these types help you interpret the data they contain. +They organize the response payload types and the information embedded in them. ## Topics diff --git a/Sources/NIOIMAPCore/NIOIMAPCore.docc/SupportedExtensions.md b/Sources/NIOIMAPCore/NIOIMAPCore.docc/SupportedExtensions.md index 929b6a0d..9e512889 100644 --- a/Sources/NIOIMAPCore/NIOIMAPCore.docc/SupportedExtensions.md +++ b/Sources/NIOIMAPCore/NIOIMAPCore.docc/SupportedExtensions.md @@ -1,6 +1,6 @@ # Supported IMAP Extensions -NIOIMAP supports a variety of known IMAP extensions. This page documents the complete list of supported capabilities and their corresponding RFC specifications. +A complete list of IMAP extension capabilities NIOIMAPCore supports, with links to their RFC specifications. For more information about IMAP capabilities, see the [IANA IMAP Capabilities Registry](https://www.iana.org/assignments/imap-capabilities/imap-capabilities.xhtml). @@ -212,4 +212,4 @@ The [UIDBATCHES extension](https://datatracker.ietf.org/doc/draft-ietf-mailmaint Google's [Gmail IMAP Extensions](https://developers.google.com/gmail/imap/imap-extensions) provide additional capabilities for working with Gmail-specific features like conversation threading and labels. The extensions are indicated by the ``Capability/gmailExtensions`` capability and require the `X-GM-EXT-1` capability. -Gmail labels (equivalent to mailbox tags) are represented using ``GmailLabel`` and can be modified via ``StoreGmailLabels`` for add, remove, or replace operations. Messages include ``MessageAttribute/gmailMessageID(_:)`` for a stable message identifier, ``MessageAttribute/gmailThreadID(_:)`` for conversation threading, and ``MessageAttribute/gmailLabels(_:)`` for label information. Use ``FetchAttribute/gmailMessageID``, ``FetchAttribute/gmailThreadID``, and ``FetchAttribute/gmailLabels`` to retrieve these attributes in FETCH responses. +Gmail labels, which are equivalent to mailbox tags, are represented using ``GmailLabel`` and can be modified via ``StoreGmailLabels`` for add, remove, or replace operations. Messages include ``MessageAttribute/gmailMessageID(_:)`` for a stable message identifier, ``MessageAttribute/gmailThreadID(_:)`` for conversation threading, and ``MessageAttribute/gmailLabels(_:)`` for label information. Use ``FetchAttribute/gmailMessageID``, ``FetchAttribute/gmailThreadID``, and ``FetchAttribute/gmailLabels`` to retrieve these attributes in FETCH responses. diff --git a/Sources/NIOIMAPCore/Parser/CommandParser.swift b/Sources/NIOIMAPCore/Parser/CommandParser.swift index afba4e3b..b363ece8 100644 --- a/Sources/NIOIMAPCore/Parser/CommandParser.swift +++ b/Sources/NIOIMAPCore/Parser/CommandParser.swift @@ -36,7 +36,7 @@ public struct SynchronizedCommand: Hashable, Sendable { /// A command to be sent to a server. /// - /// This is the actual ``CommandStreamPart`` (or part of a command in streaming mode). + /// The actual ``CommandStreamPart`` (or part of a command in streaming mode). /// May be `nil` if only continuation data is being sent. public var commandPart: CommandStreamPart? @@ -109,13 +109,13 @@ public struct CommandParser: Parser, Sendable { /// The maximum number of bytes that can be buffered at any time. /// /// When the parser accumulates more than this limit, an error is thrown. - /// This serves as DoS protection against malicious or malformed input. + /// Serves as DoS protection against malicious or malformed input. /// Defaults to ``IMAPDefaults/lineLengthLimit`` (8192 bytes). public let bufferLimit: Int /// The maximum size of a single literal (data between `{size}` markers). /// - /// This serves as DoS protection against excessively large literal data. + /// Serves as DoS protection against excessively large literal data. /// Defaults to ``IMAPDefaults/literalSizeLimit`` (4096 bytes). public var literalSizeLimit: Int { parser.literalSizeLimit } private(set) var mode: Mode = .lines diff --git a/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser+Response.swift b/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser+Response.swift index 94d2a90f..5a89611d 100644 --- a/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser+Response.swift +++ b/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser+Response.swift @@ -79,7 +79,7 @@ extension GrammarParser { } } - /// This is a combination of `resp-cond-state`, `resp-cond-bye`, and `greeting`. + /// A combination of `resp-cond-state`, `resp-cond-bye`, and `greeting`. func parseUntaggedResponseStatus(buffer: inout ParseBuffer, tracker: StackTracker) throws -> UntaggedStatus { try PL.composite(buffer: &buffer, tracker: tracker) { (buffer, tracker) in let code = try self.parseAtom(buffer: &buffer, tracker: tracker) diff --git a/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser.swift b/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser.swift index 82c8ca1f..390fd512 100644 --- a/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser.swift +++ b/Sources/NIOIMAPCore/Parser/Grammar/GrammarParser.swift @@ -36,7 +36,7 @@ let badOS = { fatalError("unsupported OS") }() /// To prevent memory exhaustion from malformed or malicious input, a maximum literal /// size is enforced. If a literal exceeds this limit, this error is thrown. /// -/// This is a DoS protection mechanism. +/// A DoS protection mechanism. /// /// - SeeAlso: [RFC 3501 Section 4.3.3](https://datatracker.ietf.org/doc/html/rfc3501#section-4.3.3), /// ``ExceededMaximumBodySizeError`` @@ -2568,8 +2568,8 @@ extension GrammarParser { /// Variant of `parseString()` allowing non-ASCII inside quoted strings. /// - /// This is not allowed by RFC 3501, but some emails have non-ASCII headers, and some servers - /// end up copying the non-ASCII values into e.g. `BODYSTRUCTURE` parameters. + /// Not allowed by RFC 3501, but some emails have non-ASCII headers, and some servers + /// end up copying the non-ASCII values into, for example, `BODYSTRUCTURE` parameters. func parseStringAllowingNonASCII(buffer: inout ParseBuffer, tracker: StackTracker) throws -> ByteBuffer { try PL.parseOneOf( self.parseQuoted, diff --git a/Sources/NIOIMAPCore/Parser/ParserLibrary.swift b/Sources/NIOIMAPCore/Parser/ParserLibrary.swift index 11bd1c25..b17d603d 100644 --- a/Sources/NIOIMAPCore/Parser/ParserLibrary.swift +++ b/Sources/NIOIMAPCore/Parser/ParserLibrary.swift @@ -75,7 +75,7 @@ extension ParseBuffer { public struct BadCommand: Error { /// The tag of the bad command. /// - /// This allows the server to send a properly-tagged error response to the client, + /// Allows the server to send a properly-tagged error response to the client, /// maintaining IMAP's request/response correlation even when the command is malformed. public var commandTag: String @@ -90,7 +90,7 @@ public struct BadCommand: Error { /// `ParserError` is thrown when the IMAP protocol parser encounters bytes that cannot be /// interpreted according to the IMAP grammar (RFC 3501 or extensions). Common causes include: /// - Invalid UTF-8 sequences in string fields -/// - Malformed protocol syntax (e.g., unexpected characters or missing required elements) +/// - Malformed protocol syntax (for example, unexpected characters or missing required elements) /// - Non-conforming protocol elements /// /// The ``hint`` field provides a developer-friendly description of what went wrong. @@ -104,7 +104,7 @@ public struct ParserError: Error { /// If possible, a description of the error and why it occurred. /// - /// This hint describes the parsing failure in human-readable terms, such as + /// Describes the parsing failure in human-readable terms, such as /// "Invalid UTF8", "Missing CRLF", "Unexpected character", etc. It's intended /// for logging and debugging purposes. public var hint: String @@ -120,12 +120,12 @@ public struct ParserError: Error { /// Signals that a protocol message was too complex and required excessive recursive parsing. /// -/// IMAP protocol elements can nest (e.g., nested parenthesized lists in BODYSTRUCTURE), +/// IMAP protocol elements can nest (for example, nested parenthesized lists in BODYSTRUCTURE), /// and parsing uses recursion to handle this. To prevent stack overflow attacks, /// the parser enforces a maximum recursion depth. If this limit is exceeded, this error /// is thrown. /// -/// This is a safety limit to prevent malicious or extremely unusual protocol messages +/// A safety limit to prevent malicious or extremely unusual protocol messages /// from causing a stack overflow. /// /// - SeeAlso: [RFC 3501 Section 4.3](https://datatracker.ietf.org/doc/html/rfc3501#section-4.3) (protocol syntax) @@ -136,7 +136,7 @@ public struct TooMuchRecursion: Error { /// depth would exceed this limit. This prevents stack overflow from deeply nested /// protocol structures. /// - /// This limit is currently fixed at compile-time and not configurable at runtime. + /// Currently fixed at compile-time and not configurable at runtime. public var limit: Int init(limit: Int) { diff --git a/Sources/NIOIMAPCore/Parser/ResponseParser.swift b/Sources/NIOIMAPCore/Parser/ResponseParser.swift index 697b839e..55620030 100644 --- a/Sources/NIOIMAPCore/Parser/ResponseParser.swift +++ b/Sources/NIOIMAPCore/Parser/ResponseParser.swift @@ -41,7 +41,7 @@ public struct ExceededMaximumMessageAttributesError: Error { /// Parsing a server response exceeded the maximum allowed body size. /// -/// Server responses can include large message bodies (e.g., in FETCH responses). +/// Server responses can include large message bodies (for example, in FETCH responses). /// If a body exceeds the configured maximum size, this error is thrown. This is a /// DoS and memory protection limit. /// @@ -126,7 +126,7 @@ public struct ResponseParser: Parser, Sendable { /// /// When provided, every parsed string is passed through this function, which /// can return a cached version. This reduces memory usage for responses with - /// many repeated strings (e.g., flag names). Defaults to `nil` (no caching). + /// many repeated strings (for example, flag names). Defaults to `nil` (no caching). public var parsedStringCache: (@Sendable (String) -> String)? /// Creates new response parser options. diff --git a/Sources/NIOIMAPCore/Parser/SynchronizingLiteralParser.swift b/Sources/NIOIMAPCore/Parser/SynchronizingLiteralParser.swift index 2d3ce364..a33e1108 100644 --- a/Sources/NIOIMAPCore/Parser/SynchronizingLiteralParser.swift +++ b/Sources/NIOIMAPCore/Parser/SynchronizingLiteralParser.swift @@ -21,7 +21,7 @@ import struct NIO.ByteBufferView /// a command containing a literal, it first sends `{size}` and then waits for a `+` /// continuation response from the server before sending the actual literal bytes. /// -/// This parser scans command data to identify literal sizes and locations, determining +/// Scans command data to identify literal sizes and locations, determining /// which bytes must wait for continuation responses and which can be sent immediately. /// It distinguishes between: /// - Synchronizing literals (`{100}`) - require continuation diff --git a/Sources/NIOIMAPCore/Pipelining.swift b/Sources/NIOIMAPCore/Pipelining.swift index df4c0957..6e1698ca 100644 --- a/Sources/NIOIMAPCore/Pipelining.swift +++ b/Sources/NIOIMAPCore/Pipelining.swift @@ -38,7 +38,7 @@ public enum PipeliningRequirement: Hashable, Sendable { /// No command that depends on or changes the mailbox selection can be running. /// - /// This requirement is imposed by commands like `SELECT`, `EXAMINE`, `UNSELECT`, + /// Imposed by commands like `SELECT`, `EXAMINE`, `UNSELECT`, /// and `CLOSE` that establish or clear the mailbox selection context. case noMailboxCommandsRunning @@ -50,7 +50,7 @@ public enum PipeliningRequirement: Hashable, Sendable { /// No command using UIDs to specify messages can be running. /// - /// This is a requirement for sequence number-based commands, since a UID-based + /// A requirement for sequence number-based commands, since a UID-based /// command might invalidate the mailbox state. case noUIDBasedCommandRunning @@ -105,20 +105,20 @@ extension PipeliningRequirement { /// - SeeAlso: ``PipeliningRequirement``, ``CommandStreamPart/pipeliningBehavior``, /// [RFC 3501 Section 5.5](https://datatracker.ietf.org/doc/html/rfc3501#section-5.5) public enum PipeliningBehavior: Hashable, Sendable { - /// This command establishes a new mailbox selection. + /// Indicates the command establishes a new mailbox selection. /// /// Commands like `SELECT`, `EXAMINE`, and `UNSELECT` change which mailbox is active. /// These commands satisfy the requirement ``PipeliningRequirement/noMailboxCommandsRunning`` /// imposed by other mailbox-selection commands. case changesMailboxSelection - /// This command operates within and depends on the current mailbox selection. + /// Indicates the command depends on and operates within the current mailbox selection. /// /// Commands like `FETCH`, `STORE`, `SEARCH`, `EXPUNGE`, etc. require a mailbox /// to be selected and will fail if no selection is active. case dependsOnMailboxSelection - /// This command may trigger untagged `EXPUNGE` responses. + /// Indicates the command may trigger untagged `EXPUNGE` responses. /// /// Most commands can cause the server to send untagged `EXPUNGE` responses, /// invalidating the sequence numbers of remaining messages. Only `FETCH`, `STORE`, @@ -126,20 +126,20 @@ public enum PipeliningBehavior: Hashable, Sendable { /// requirement ``PipeliningRequirement/noUntaggedExpungeResponse``. case mayTriggerUntaggedExpunge - /// This command uses UIDs to identify messages or is itself a `UID` command. + /// Indicates the command uses UIDs to identify messages or is itself a `UID` command. /// /// Commands like `UID FETCH`, `UID STORE`, etc. operate on UIDs. This behavior /// satisfies the requirement ``PipeliningRequirement/noUIDBasedCommandRunning``. case isUIDBased - /// This command changes flags on these specific messages. + /// Indicates the command changes flags on these specific messages. /// /// For non-silent `STORE` operations and similar flag-modifying commands, this /// behavior indicates which messages have their flags changed. Satisfies /// ``PipeliningRequirement/noFlagReads(_:)`` requirements on those messages. case changesFlags(MessageIdentifierSetNonEmpty) - /// This command queries flags from these specific messages. + /// Indicates the command queries flags from these specific messages. /// /// For `FETCH` commands with flag attributes and similar flag-reading commands, /// this behavior indicates which messages have their flags read. Satisfies @@ -160,13 +160,13 @@ public enum PipeliningBehavior: Hashable, Sendable { } extension PipeliningBehavior { - /// This command is changing flags on all messages. + /// A convenience member: indicates the command is changing flags on all messages. /// /// Convenience static member equivalent to ``changesFlags(_:)`` with /// ``MessageIdentifierSetNonEmpty/all``. public static let changesFlagsOnAnyMessage = PipeliningBehavior.changesFlags(.all) - /// This command is querying flags from all messages. + /// A convenience member: indicates the command is querying flags from all messages. /// /// Convenience static member equivalent to ``readsFlags(_:)`` with /// ``MessageIdentifierSetNonEmpty/all``. @@ -176,7 +176,7 @@ extension PipeliningBehavior { extension CommandStreamPart { /// The requirements that must be satisfied before this command can start. /// - /// This property returns the ``PipeliningRequirement`` constraints imposed by this + /// Returns the ``PipeliningRequirement`` constraints imposed by this /// command. Before sending this command, verify that all currently running commands /// together satisfy these requirements. /// @@ -324,7 +324,7 @@ extension Command { extension CommandStreamPart { /// The pipelining characteristics of this command. /// - /// This property returns the ``PipeliningBehavior`` values that describe how this + /// Returns the ``PipeliningBehavior`` values that describe how this /// command behaves with respect to pipelining. These behaviors affect what new /// commands can be sent while this command is running. /// diff --git a/Sources/NIOIMAPCore/PreviewText.swift b/Sources/NIOIMAPCore/PreviewText.swift index 30e5f51c..949146d7 100644 --- a/Sources/NIOIMAPCore/PreviewText.swift +++ b/Sources/NIOIMAPCore/PreviewText.swift @@ -19,7 +19,7 @@ /// along with the full message, improving client UX without requiring clients to parse /// message structures themselves. /// -/// This type provides type safety by wrapping the raw string in a distinct type, making +/// Provides type safety by wrapping the raw string in a distinct type, making /// it clear in the API that a given string is specifically a message preview. /// /// - SeeAlso: [RFC 8970](https://datatracker.ietf.org/doc/html/rfc8970), ``MessageAttribute/preview(_:)`` diff --git a/Sources/NIOIMAPCore/ResponseEncodeBuffer.swift b/Sources/NIOIMAPCore/ResponseEncodeBuffer.swift index 825f1dac..c4a36260 100644 --- a/Sources/NIOIMAPCore/ResponseEncodeBuffer.swift +++ b/Sources/NIOIMAPCore/ResponseEncodeBuffer.swift @@ -68,7 +68,7 @@ public struct ResponseEncodeBuffer: Sendable { extension ResponseEncodeBuffer { /// Creates a new response encoding buffer from server capabilities. /// - /// This initializer converts a list of ``Capability`` values into ``ResponseEncodingOptions``, + /// Converts a list of ``Capability`` values into ``ResponseEncodingOptions``, /// which enables capability-dependent encoding options if the server advertises them. /// /// - Parameters: diff --git a/Sources/NIOIMAPCore/ResponseEncodingOptions.swift b/Sources/NIOIMAPCore/ResponseEncodingOptions.swift index 54dc5b0d..76530f63 100644 --- a/Sources/NIOIMAPCore/ResponseEncodingOptions.swift +++ b/Sources/NIOIMAPCore/ResponseEncodingOptions.swift @@ -43,7 +43,7 @@ public struct ResponseEncodingOptions: Hashable, Sendable { extension ResponseEncodingOptions { /// Creates response encoding options based on server capabilities. /// - /// This initializer provides a hook for capability-dependent encoding configuration, + /// Provides a hook for capability-dependent encoding configuration, /// though currently no capabilities affect response encoding options. The capabilities /// parameter is provided for future extensibility. /// diff --git a/Sources/NIOIMAPCore/String+ByteBuffer.swift b/Sources/NIOIMAPCore/String+ByteBuffer.swift index 164b6780..b3186dc9 100644 --- a/Sources/NIOIMAPCore/String+ByteBuffer.swift +++ b/Sources/NIOIMAPCore/String+ByteBuffer.swift @@ -34,8 +34,8 @@ extension String { ) } - /// Will try to decode the bytes as UTF8, skipping any that are invalid. - /// This will ignore any invalid UTF8 bytes, and so should *only* be used when + /// Decodes bytes as UTF-8, skipping any that are invalid. + /// Ignores any invalid UTF8 bytes, and so should *only* be used when /// displaying the string to a user. Don't use over the network. init(bestEffortDecodingUTF8Bytes buffer: T) where T.Element == UInt8 { self = "" diff --git a/Sources/NIOIMAPCore/_ByteBufferProtocol.swift b/Sources/NIOIMAPCore/_ByteBufferProtocol.swift index 56d00eed..13ace109 100644 --- a/Sources/NIOIMAPCore/_ByteBufferProtocol.swift +++ b/Sources/NIOIMAPCore/_ByteBufferProtocol.swift @@ -39,7 +39,7 @@ extension ByteBufferView: _ByteBufferViewAPITemplate {} /// - `Foundation`'s `Data` /// - `[UInt8]` and generally any `Collection` of `UInt8` /// -/// ### Random Access +/// ### Random access /// For every supported type `ByteBuffer` usually contains two methods for random access: /// /// 1. `get(at: Int, length: Int)` where `` is for example `String`, `Data`, `Bytes` (for `[UInt8]`) @@ -58,7 +58,7 @@ extension ByteBufferView: _ByteBufferViewAPITemplate {} /// /// If needed, `ByteBuffer` will automatically resize its storage to accommodate your `set` request. /// -/// ### Sequential Access +/// ### Sequential access /// `ByteBuffer` provides two properties which are indices into the `ByteBuffer` to support sequential access: /// - `readerIndex`, the index of the next readable byte /// - `writerIndex`, the index of the next byte to write @@ -121,8 +121,8 @@ protocol _ByteBufferAPITemplate where Self: Hashable, Self: CustomStringConverti /// Reserves enough space to store the specified number of bytes. /// - /// This method will ensure that the buffer has space for at least as many bytes as requested. - /// This includes any bytes already stored, and completely disregards the reader/writer indices. + /// Ensures that the buffer has space for at least as many bytes as requested. + /// Includes any bytes already stored, and completely disregards the reader/writer indices. /// If the buffer already has space to store the requested number of bytes, this method will be /// a no-op. /// @@ -132,7 +132,7 @@ protocol _ByteBufferAPITemplate where Self: Hashable, Self: CustomStringConverti /// Reserves enough space to write at least the specified number of bytes. /// - /// This method will ensure that the buffer has enough writable space for at least as many bytes + /// Ensures that the buffer has enough writable space for at least as many bytes /// as requested. If the buffer already has space to write the requested number of bytes, this /// method will be a no-op. ///