def single_optional

bendvy-ecs-core@0.1.0.4 · inspector_query.bend:81

import bendvy-ecs-core@0.1.0.4/inspector_query.bend as InspectorQuery
import Base
import inspector_query_projection.bend as Q

81# Return H and None for zero matches, Some row for one, or MultipleEntities
82# for more than one. Empty is a successful result, unlike single.
83def single_optional(~H:Type,~S:Data,~V:Data,~cap:ReadQuery<H,S,V>,owner:H) -> H & Result<&2,&2,SingleError,Maybe<&2,Q.Row<S,V>>>:
84  optional_observed(~H,~S,~V,each(~H,~S,~V,~cap,owner))

Uses (8)

Used by (0)

No other definition uses this definition.