Skip to main content

settle

Function settle 

Source
pub fn settle(
    kind: &str,
    fields: &mut BTreeMap<String, String>,
    parts: &mut Parts,
) -> Result<(), String>
Expand description

Makes a card’s parts and plain fields agree, on every save (by the person, an agent or an import): the number as digits, the expiry as exp_month and exp_year (the older expiry read into them and dropped), the brand worked out from the number, expires set to the last day of the expiry month for the reminders, and the default flag kept to yes. A month or year that is not one is refused; a number with anything but digits is left as typed (the pane warns, the Vault doesn’t decide). Any other kind is left alone.