tiger_lib::effect

Function validate_effect_internal

Source
pub fn validate_effect_internal(
    caller: &Lowercase<'_>,
    list_type: ListType,
    block: &Block,
    data: &Everything,
    sc: &mut ScopeContext,
    vd: &mut Validator<'_>,
    tooltipped: Tooltipped,
)
Expand description

The interface to effect validation when validate_effect is too limited.

caller is the key that opened this effect. It is used to determine which special cases apply. For example, if caller is if then a limit block is expected.

list_type specifies whether this effect is directly in an iterator of the specified ListType. It is also used to determine which special cases apply. The list_type must not be ListType::Any because that is only used for triggers.

vd is a Validator that may have already been checked for some fields by the caller. This is because some effects are in contexts where other keys than just the effects are valid.