IfBuilder
if_
¶
Select this value for a comparison
Parameters:
-
*target
(Retriever | int | Get
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
if_not
¶
Select this value for a comparison with the result inverted
Parameters:
-
*target
(Retriever | int | Get
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
if_len
¶
Select this value and use its length for a comparison
Parameters:
-
*target
(Retriever | int | Get
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
if_ver
¶
Checks if the current struct version is between the specified min/max. Either min/max may be omitted to leave that check unbounded
Parameters:
-
min
(Version
, default:Version(-1)
) –The minimum required version
-
max
(Version
, default:Version(10000)
) –The maximum required version
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
IfBuilder
¶
Constructs combinators that may execute conditionally during parsing, depending on the values of their retriever inputs
eq
¶
Checks if the previously selected value is equal to this value
Parameters:
-
*source
(Retriever | int | Get
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
ge
¶
Checks if the previously selected value is greater than or equal to this value
Parameters:
-
*source
(Retriever | int | Get
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
gt
¶
Checks if the previously selected value is greater than this value
Parameters:
-
*source
(Retriever | int | Get
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
le
¶
Checks if the previously selected value is lesser than or equal to this value
Parameters:
-
*source
(Retriever | int | Get
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
lt
¶
Checks if the previously selected value is lesser than this value
Parameters:
-
*source
(Retriever | int | Get
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
ne
¶
Checks if the previously selected value is not equal to this value
Parameters:
-
*source
(Retriever | int | Get
, default:()
) –The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct
Returns:
-
IfBuilder
–An
IfBuilder
instance to continue defining additional combinator properties
then
¶
then(com: Combinator) -> Combinator
Finishes the if-combinator construction by defining a nested combinator, should be called last on an
IfBuilder
Parameters:
-
com
(Combinator
) –The nested combinator to run if the conditions for this if combinator are met
Returns:
-
Combinator
–A combinator that encodes the conditional logic defined by the
IfBuilder
chain