Skip to main content

upsert

Function upsert 

Source
pub fn upsert(
    path: &Path,
    account: &str,
    description: Option<&str>,
    profile: Option<(&str, &Profile)>,
    make_default: bool,
) -> Result<String, StoreError>
Expand description

Add or update an account and, optionally, a profile pointing at it.

Returns the file’s new contents, so a caller can show what changed without reading the file back.