Qualify observes the qualification of a object via a value computed at runtime.
(vars Activation, obj any)
| 1632 | |
| 1633 | // Qualify observes the qualification of a object via a value computed at runtime. |
| 1634 | func (e *evalWatchQual) Qualify(vars Activation, obj any) (any, error) { |
| 1635 | out, err := e.Qualifier.Qualify(vars, obj) |
| 1636 | var val ref.Val |
| 1637 | if err != nil { |
| 1638 | val = types.LabelErrNode(e.ID(), types.WrapErr(err)) |
| 1639 | } else { |
| 1640 | val = e.adapter.NativeToValue(out) |
| 1641 | } |
| 1642 | e.observer(vars, e.ID(), e.Qualifier, val) |
| 1643 | return out, err |
| 1644 | } |
| 1645 | |
| 1646 | // QualifyIfPresent conditionally qualifies the variable and only records a value if one is present. |
| 1647 | func (e *evalWatchQual) QualifyIfPresent(vars Activation, obj any, presenceOnly bool) (any, bool, error) { |
nothing calls this directly
no test coverage detected