load is helper for the public methods on Source.
(slot int, objPtr reflect.Value, wait bool, fn func())
| 359 | |
| 360 | // load is helper for the public methods on Source. |
| 361 | func (od *objectDecoder) load(slot int, objPtr reflect.Value, wait bool, fn func()) { |
| 362 | // Note that we have reconciled the type and may remap the fields here |
| 363 | // to match what's expected by the decoder. The "slot" parameter here |
| 364 | // is in terms of the local type, where the fields in the encoded |
| 365 | // object are in terms of the wire object's type, which might be in a |
| 366 | // different order (but will have the same fields). |
| 367 | v := *od.encoded.Field(od.rte.FieldOrder[slot]) |
| 368 | od.ds.decodeObject(od.ods, objPtr.Elem(), v) |
| 369 | if wait { |
| 370 | // Mark this individual object a blocker. |
| 371 | od.ds.waitObject(od.ods, v, fn) |
| 372 | } |
| 373 | } |
| 374 | |
| 375 | // aterLoad implements Source.AfterLoad. |
| 376 | func (od *objectDecoder) afterLoad(fn func()) { |
nothing calls this directly
no test coverage detected