mirror of
https://github.com/apple/swift-nio-imap
synced 2026-11-28 05:14:27 +00:00
Each “part” in a `BodyStructure` has an RFC 2045 “media type” — which is a combination of “top level type” + “sub-stype”.
But the types that were previously used, were inconsistently used / named. This PR cleans up the use of these and makes them consistent.
Additionally it adds a
```swift
extension BodyStructure {
public var mediaType: Media.MediaType
}
```
such that it’s easy to get to a part’s media type, regardless of its kind.