[][src]Function mail_test_account::store_account_info

pub fn store_account_info(
    tag: &str,
    info: &AccountAndServiceInfo
) -> Result<(), Error>

Stores given AccountAndServiceInfo instance as json in the config dir.

The config dir is the dir defined through the xdg directory spec (i.e. it can be influenced by environment variables). The default is: ~/.config/ethereal-mail-test-account/<tag>.json (replacing <tag> with the tag).

Error

This can fail for a number of reasons:

  1. The tag does not match [a-Z0-9_-]+.
  2. Getting config file path fails for one reason or another.
  3. Writing to the config file path fails.