gmime.header_list

Module for [HeaderList] class

Types 3

A list of message or mime-part headers.

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
HeaderList self() nothrowReturns `this`, for use in `with` statements.
HeaderListGidBuilder builder() static nothrowGet builder for [gmime.header_list.HeaderList] Returns: New builder object
void append(string name, string value, string charset = null) nothrowAppends a header. If value is null, a space will be set aside for it (useful for setting the order of headers before values can be obtained for them) otherwise the header will be unset.
void clear() nothrowRemoves all of the headers from the #GMimeHeaderList.
bool contains(string name) nothrowChecks whether or not a header exists.
int getCount() nothrowGets the number of headers contained within the header list. Returns: the number of headers in the header list.
gmime.header.Header getHeader(string name) nothrowGets the first header with the specified name.
gmime.header.Header getHeaderAt(int index) nothrowGets the header at the specified index within the list.
void prepend(string name, string value, string charset = null) nothrowPrepends a header. If value is null, a space will be set aside for it (useful for setting the order of headers before values can be obtained for them) otherwise the header will be unset.
bool remove(string name) nothrowRemove the first instance of the specified header.
void removeAt(int index) nothrowRemoves the header at the specified index from headers.
void set(string name, string value, string charset = null) nothrowSet the value of the specified header. If value is null and the header, name, had not been previously set, a space will be set aside for it (useful for setting the order of headers before values ca...
string toString_(gmime.format_options.FormatOptions options = null) nothrowAllocates a string buffer containing the raw rfc822 headers contained in headers.
ptrdiff_t writeToStream(gmime.format_options.FormatOptions options, gmime.stream.Stream stream) nothrowWrite the headers to a stream.
Constructors
this(void * ptr, Flag!"Take" take)
this(gmime.parser_options.ParserOptions options = null)Creates a new #GMimeHeaderList object.

Fluent builder for gmime.header_list.HeaderList

Methods
HeaderList build() nothrowCreate object from builder. Returns: New object