|
Email Generator 2.1.3
Email addresses in each country's style for C++23
|
Return type for email generation. More...
#include <emailgen.hpp>
Public Member Functions | |
| std::string | address () const |
| The address. | |
| std::uint64_t | seed () const |
| Retrieve the random seed used to generate this address. | |
| const core::seed_signature & | signature () const |
| The seed and the data this address was generated from. | |
| std::string | to_string () const |
| Human-readable summary string. | |
| void | to_json (core::json_writer &w) const |
| Write this address as a JSON object. | |
| std::string | to_json () const |
| This address as a JSON document. | |
| operator std::string () const | |
| Implicit conversion to std::string. | |
Public Attributes | |
| std::string | country_code |
| ISO 3166-1 alpha-2 of the country whose style the address follows. | |
| std::string | local |
The part before the @: [a-z0-9._-], at most 64 characters. | |
| std::string | domain |
The part after the @. | |
| std::string | kind |
free (webmail) or isp (a provider of the country); empty for a reserved domain. | |
| bool | reserved {false} |
True when the domain is one RFC 2606 reserves (example.com, .net, .org): the safe option. | |
Friends | |
| class | emg |
| std::ostream & | operator<< (std::ostream &os, const email &v) |
| Stream the address to an output stream. | |
Return type for email generation.
Supports implicit conversion to std::string (the address), streaming via operator<< and JSON output via to_json().
Definition at line 74 of file emailgen.hpp.
|
inline |
|
inline |
Implicit conversion to std::string.
Definition at line 128 of file emailgen.hpp.
|
inline |
Retrieve the random seed used to generate this address.
Definition at line 90 of file emailgen.hpp.
|
inline |
The seed and the data this address was generated from.
data is emg::data_hash() at the time of generation. Definition at line 95 of file emailgen.hpp.
|
inline |
This address as a JSON document.
{"country_code":"DE","address":"...",...}. Definition at line 119 of file emailgen.hpp.
|
inline |
Write this address as a JSON object.
| w | Writer positioned where a value is allowed. |
Definition at line 103 of file emailgen.hpp.
|
inline |
|
friend |
Definition at line 145 of file emailgen.hpp.
|
friend |
Stream the address to an output stream.
| os | Output stream. |
| v | The address to stream. |
Definition at line 137 of file emailgen.hpp.
| std::string dasmig::email::country_code |
ISO 3166-1 alpha-2 of the country whose style the address follows.
Definition at line 77 of file emailgen.hpp.
| std::string dasmig::email::domain |
The part after the @.
Definition at line 79 of file emailgen.hpp.
| std::string dasmig::email::kind |
free (webmail) or isp (a provider of the country); empty for a reserved domain.
Definition at line 80 of file emailgen.hpp.
| std::string dasmig::email::local |
The part before the @: [a-z0-9._-], at most 64 characters.
Definition at line 78 of file emailgen.hpp.
| bool dasmig::email::reserved {false} |
True when the domain is one RFC 2606 reserves (example.com, .net, .org): the safe option.
Definition at line 81 of file emailgen.hpp.