struct Address
XuAPI
pub struct Address {
pub name string
pub address string
}Purpose
Structure encapsulating name, address.
Public fields
namestring- name
addressstring- field (string)
#net/mailMailbox address parsing.
struct Addresspub struct Address {
pub name string
pub address string
}Structure encapsulating name, address.
name stringaddress stringparse_addresspub fn parse_address(s &string) AddressParse as address. Throws on failure; handle the error or propagate it to the caller.
s &stringAddress — a value of this type
parse_address_listpub fn parse_address_list(s &string) []AddressParse as address list. Throws on failure; handle the error or propagate it to the caller.
s &string[]Address — slice result
(Address) formatpub fn (a Address) format() stringOperation on Address: format as a string. Throws on failure; handle the error or propagate it to the caller.
a AddressAddress instance used by this call (value receiver).string — result string
(Address) to_stringpub fn (a Address) to_string() stringOperation on Address: convert to string.
a AddressAddress instance used by this call (value receiver).string — result string