struct MIMEHeader
pub struct MIMEHeader {
pub keys []string
pub vals []string
}Purpose
Textproto Metadata header descriptor structure.
Public fields
keys[]string- field ([]string)
vals[]string- field ([]string)
#net/textprotoMIME header canonicalization and parse.
struct MIMEHeaderpub struct MIMEHeader {
pub keys []string
pub vals []string
}Textproto Metadata header descriptor structure.
keys []stringvals []stringstruct HeaderReadpub struct HeaderRead {
pub header MIMEHeader
pub rest string
}Structure encapsulating header, rest.
header MIMEHeaderrest stringstruct CodeLinepub struct CodeLine {
pub code int
pub msg string
pub cont bool
}Structure encapsulating code, msg, cont.
code intmsg stringcont boolcanonical_mime_header_keypub fn canonical_mime_header_key(s &string) stringCanonical mime header key.
s &stringstring — result string
trim_stringpub fn trim_string(s &string) stringTrim string.
s &stringstring — result string
new_headerpub fn new_header() MIMEHeaderConstruct header.
No arguments are required.
MIMEHeader — a value of this type
(MIMEHeader) getpub fn (h MIMEHeader) get(key &string) stringExecute get on MIMEHeader.
h MIMEHeaderMIMEHeader instance used by this call (value receiver).key &stringstring — result string
(MIMEHeader) valuespub fn (h MIMEHeader) values(key &string) []stringReturn a slice containing all values in the collection.
h MIMEHeaderMIMEHeader instance used by this call (value receiver).key &string[]string — slice result
($&MIMEHeader) addpub fn (h $&MIMEHeader) add(key &string, value &string)Operation on $&MIMEHeader: add.
h $&MIMEHeaderMIMEHeader instance used by this call (exclusive borrow).key &stringvalue &stringThis call does not return a value.
($&MIMEHeader) delpub fn (h $&MIMEHeader) del(key &string)Delete the entry matching the given key or identifier.
h $&MIMEHeaderMIMEHeader instance used by this call (exclusive borrow).key &stringThis call does not return a value.
($&MIMEHeader) setpub fn (h $&MIMEHeader) set(key &string, value &string)Execute set on $&MIMEHeader.
h $&MIMEHeaderMIMEHeader instance used by this call (exclusive borrow).key &stringvalue &stringThis call does not return a value.
(MIMEHeader) lenpub fn (h MIMEHeader) len() intOperation on MIMEHeader: return the length.
h MIMEHeaderMIMEHeader instance used by this call (value receiver).int — a value of this type
(MIMEHeader) clonepub fn (h MIMEHeader) clone() MIMEHeaderOperation on MIMEHeader: copy into a new independent string.
h MIMEHeaderMIMEHeader instance used by this call (value receiver).MIMEHeader — a value of this type
read_mime_header_checkedpub fn read_mime_header_checked(src &string) HeaderReadRead mime header checked. Throws on failure; handle the error or propagate it to the caller.
src &stringHeaderRead — a value of this type
read_mime_headerpub fn read_mime_header(src &string) HeaderReadRead mime header.
src &stringHeaderRead — a value of this type
parse_code_linepub fn parse_code_line(line &string) CodeLineParse as code line. Throws on failure; handle the error or propagate it to the caller.
line &stringCodeLine — a value of this type