From 84229d050333e7cfae3dadf1c598dc6099b1a29b Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Wed, 28 Feb 2024 15:06:21 -0500 Subject: [PATCH] reword some doc comments --- src/mime.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/mime.rs b/src/mime.rs index def3947..40be7ef 100644 --- a/src/mime.rs +++ b/src/mime.rs @@ -34,7 +34,7 @@ pub enum MimeType { /// /// Fallback without charset parameter. TextPlain, - /// Other mime type + /// Other mime type. Other(Cow<'static, str>), } @@ -55,15 +55,16 @@ impl MimeType { /// Describes the mime types which are accepted pub trait AllowedMimeTypes: TryFrom<(Vec, MimeType)> { + /// List allowed mime types for the type to convert from a byte slice. fn allowed() -> Cow<'static, [MimeType]>; } /// Can be converted to data with the available mime types pub trait AsMimeTypes { - /// Available mime types for this data + /// List available mime types for this data to convert to a byte slice. fn available(&self) -> Cow<'static, [MimeType]>; - /// Data as a specific mime_type + /// Converts a type to a byte slice for the given mime type if possible. fn as_bytes(&self, mime_type: &MimeType) -> Option>; }