InboundStructurePatterns extension
Adds pattern-matching-related methods to InboundStructure.
Methods
-
map<
TResult extends Object?> (TResult $default(_InboundStructure value)) → TResult -
Available on InboundStructure, provided by the InboundStructurePatterns extension
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_InboundStructure value)?) → TResult? -
Available on InboundStructure, provided by the InboundStructurePatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_InboundStructure value)?, {required TResult orElse()}) → TResult -
Available on InboundStructure, provided by the InboundStructurePatterns extension
A variant ofmapthat fallback to returningorElse. -
maybeWhen<
TResult extends Object?> (TResult $default(bool hasPosition, InboundPositionStructure position, bool hasPayload, List< InboundPayloadStructure> payload)?, {required TResult orElse()}) → TResult -
Available on InboundStructure, provided by the InboundStructurePatterns extension
A variant ofwhenthat fallback to anorElsecallback. -
when<
TResult extends Object?> (TResult $default(bool hasPosition, InboundPositionStructure position, bool hasPayload, List< InboundPayloadStructure> payload)) → TResult -
Available on InboundStructure, provided by the InboundStructurePatterns extension
Aswitch-like method, using callbacks. -
whenOrNull<
TResult extends Object?> (TResult? $default(bool hasPosition, InboundPositionStructure position, bool hasPayload, List< InboundPayloadStructure> payload)?) → TResult? -
Available on InboundStructure, provided by the InboundStructurePatterns extension
A variant ofwhenthat fallback to returningnull