Function tor_config::flatten::flattenable_extract_fields

source ·
pub fn flattenable_extract_fields<'de, T: Deserialize<'de>>(
) -> &'static [&'static str]
Expand description

Extract fields of a struct, as viewed by serde

§Performance

In release builds, is very fast - all the serde nonsense boils off. In debug builds, maybe a hundred instructions, so not ideal, but it is at least O(1) since it doesn’t have any loops.

§STABILITY WARNING

This function is pub but it is #[doc(hidden)]. The only legitimate use is via the Flattenable macro. There are NO SEMVER GUARANTEES

§Panics

Will panic on types whose serde field list cannot be simply extracted via serde, which will include things that aren’t named fields structs, might include types decorated with unusual serde annotations.