Skip to main content

resolve_target

Function resolve_target 

Source
pub(crate) fn resolve_target(
    config: &LoadedConfig,
    document: &SettingsDocument,
    path: &str,
) -> Option<SettingsTarget>
Expand description

The target a caller’s path names for a read or a write.

A configured key is the document’s own row. A catalogue key the config does not set emits no row at all - an optional browser_profile, an env_file, a handoff policy - so the path is matched back to its catalogue pattern here: the key is addressable with current null, and the writer creates it on the write. The instances a pattern takes must still exist, so a mistyped account, org, project or workspace resolves to nothing rather than to a key nothing owns.