From b3026512aa9ce16c9a159d6d7de22ba0c0b93eb7 Mon Sep 17 00:00:00 2001 From: Philipp Korber Date: Thu, 14 Mar 2019 14:51:18 +0100 Subject: doc(headers): added warnings about using some parts likely to change in the future. --- headers/src/header_components/phrase.rs | 5 +++++ headers/src/header_components/word.rs | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/headers/src/header_components/phrase.rs b/headers/src/header_components/phrase.rs index 8f6a9ce..0d58d2c 100644 --- a/headers/src/header_components/phrase.rs +++ b/headers/src/header_components/phrase.rs @@ -16,6 +16,11 @@ use super::{ CFWS, FWS }; /// /// It is recommended to use the [`Phrase.new()`] constructor, which creates the right phrase /// for your input. +/// +/// **Warning: Details of this type, expect `Phrase::new` and `Phrase::try_from`, are likely to +/// change with some of the coming braking changes.** If you just create it using `try_from` +/// or `new` changes should not affect you, but if you create it from a vec of `Word`'s things +/// might be different. #[derive( Debug, Clone, Eq, PartialEq, Hash )] pub struct Phrase( //FIXME hide this away or at last turn it into a struct field, with next braking change. diff --git a/headers/src/header_components/word.rs b/headers/src/header_components/word.rs index 84713ca..448b0da 100644 --- a/headers/src/header_components/word.rs +++ b/headers/src/header_components/word.rs @@ -14,7 +14,9 @@ use ::data::Input; use super::CFWS; - +/// A ward as in the mail grammar (RFC 5322). +/// +/// **Warning: This is likely to change in the future before the 1.0 release**. #[derive( Debug, Clone, Eq, PartialEq, Hash )] pub struct Word { pub left_padding: Option, -- cgit v1.2.3