tiger_lib::trigger

Function validate_target_ok_this

Source
pub fn validate_target_ok_this(
    token: &Token,
    data: &Everything,
    sc: &mut ScopeContext,
    outscopes: Scopes,
) -> Scopes
Expand description

Validate that token is valid as the right-hand side of a field.

outscopes is the set of scope types that this target is allowed to produce.

  • Example: in has_claim_on = title:e_byzantium, the target is title:e_byzantium and it should produce a Scopes::LandedTitle scope in order to be valid for has_claim_on.

Returns the best guess about the scope type that this target resolves to.