Skip to main content

instance_inspect_members

Function instance_inspect_members 

Source
pub fn instance_inspect_members(tag: &str) -> (&'static [&'static str], bool)
Expand description

How util.inspect renders an instance of tag, as (accessors to show, whether to print the class name).

Node gives these classes a custom inspect that prints a CURATED set of accessor values — a URL shows all twelve, an AbortSignal shows only aborted, and a KeyObject shows none. With the values moved off the instance and onto prototype getters, the generic own-property renderer has nothing left to print, so every one of them rendered as an empty {}.

TextEncoder is the odd one: node’s custom inspect omits the class name, so it prints as a bare { encoding: 'utf-8' }.