Skip to main content

collect_from_entry

Function collect_from_entry 

Source
fn collect_from_entry<T: DeserializeOwned>(
    value: &Value,
    out: &mut Vec<T>,
) -> Result<(), Error>
Expand description

Extracts the recognized plugin options from one config entry.

A normal entry is a single-key {"tag": payload} object. We additionally accept a multi-key object and treat every top-level key as an independent plugin option: each key naming a known variant is deserialized (and a malformed payload for a known variant still errors, so a misconfigured plugin is never silently disabled), while keys naming unknown variants are dropped with a warning. A non-object entry (e.g. a bare number) is deserialized directly and surfaces any error.