Reads the type field, matched case-insensitively after trimming.
Reads the type field, matched case-insensitively after trimming.
'''Total, and deliberately so.''' An unrecognised value becomes AttachmentKind.Other rather than a decoding failure, for the reason the type note gives. That is why this returns a kind and not an Either.