As mentioned by @mnako in #85 , a config or state struct might be useful for future maintainability and for different types of operation.
For example, even if ParseHeaders is now a public func, storing the fact that headers have been parsed might be useful if the email is to be revisited, to avoid the need for reparsing.
A list of possible options includes:
parse headers only
parse attachment type <x> only
concurrent attachment processing (although I'm sure this needs to be an option)
Congruent with this idea is storing config and state for partially processed info in a central struct, perhaps an expanded Email struct, which might also permit easy inspection of state and convenient testability.
As mentioned by @mnako in #85 , a config or state struct might be useful for future maintainability and for different types of operation.
For example, even if
ParseHeaders
is now a public func, storing the fact that headers have been parsed might be useful if the email is to be revisited, to avoid the need for reparsing.A list of possible options includes:
<x>
onlyCongruent with this idea is storing config and state for partially processed info in a central struct, perhaps an expanded
Email
struct, which might also permit easy inspection of state and convenient testability.