pub fn protocol_lookup(v: &Value, key: &str) -> Result<Option<Value>, String>Expand description
Walk recv’s own props then its prototype chain for key, returning the
stored value (methods, inherited data props). Does NOT invoke accessors.
A PROTOCOL lookup — Symbol.toPrimitive, Symbol.hasInstance, toJSON,
then and the rest — which the spec performs with [[Get]].
That distinction only shows on a PROXY: lookup_chain walks the property
map and never asks the handler, so a proxy supplying a protocol method
through its get trap was invisible and the operation fell back to the
default. Everything else takes the cheap chain walk.