Qualify observes the qualification of a object via a value computed at runtime.
(vars Activation, obj any)
| 1183 | |
| 1184 | // Qualify observes the qualification of a object via a value computed at runtime. |
| 1185 | func (e *evalWatchAttrQual) Qualify(vars Activation, obj any) (any, error) { |
| 1186 | out, err := e.Attribute.Qualify(vars, obj) |
| 1187 | var val ref.Val |
| 1188 | if err != nil { |
| 1189 | val = types.LabelErrNode(e.ID(), types.WrapErr(err)) |
| 1190 | } else { |
| 1191 | val = e.adapter.NativeToValue(out) |
| 1192 | } |
| 1193 | e.observer(vars, e.ID(), e.Attribute, val) |
| 1194 | return out, err |
| 1195 | } |
| 1196 | |
| 1197 | // QualifyIfPresent conditionally qualifies the variable and only records a value if one is present. |
| 1198 | func (e *evalWatchAttrQual) QualifyIfPresent(vars Activation, obj any, presenceOnly bool) (any, bool, error) { |
nothing calls this directly
no test coverage detected