diff --git a/README.md b/README.md index 316ef1e..12c0219 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,11 @@ A Rust crate providing an implementation of an RFC-compliant `EmailAddress` newt [![travis.ci](https://travis-ci.org/johnstonskj/rust-email_address.svg?branch=master)](https://travis-ci.org/johnstonskj/rust-email_address) [![GitHub stars](https://img.shields.io/github/stars/johnstonskj/rust-email_address.svg)](https://github.com/johnstonskj/rust-email_address/stargazers) -TBD +Primarily for validation, the `EmailAddress` type is constructed with `FromStr::from_str` which will raise any +parsing errors. Prior to constructions the functions `is_valid`, `is_valid_local_part`, and `is_valid_domain` may +also be used to test for validity without constructing an instance. This supports all of the RFC ASCII and UTF-8 +character set rules, quoted and unquoted local parts but does not yet support all of the productions required for SMTP +headers; folding whitespace, comments, etc. ## Example diff --git a/src/lib.rs b/src/lib.rs index c472eab..a858f63 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,12 @@ /*! A Rust crate providing an implementation of an RFC-compliant `EmailAddress` newtype. +Primarily for validation, the `EmailAddress` type is constructed with `FromStr::from_str` which will raise any +parsing errors. Prior to constructions the functions `is_valid`, `is_valid_local_part`, and `is_valid_domain` may +also be used to test for validity without constructing an instance. This supports all of the RFC ASCII and UTF-8 +character set rules, quoted and unquoted local parts but does not yet support all of the productions required for SMTP +headers; folding whitespace, comments, etc. + # Example The following shoes the basic `is_valid` and `from_str` functions.