def find

bendvy-ecs-core@0.1.0.3 · execution_lifetime_scope_cleanup.bend:37

import bendvy-ecs-core@0.1.0.3/execution_lifetime_scope_cleanup.bend as ExecutionLifetimeScopeCleanup
import Base
import bendvy-ecs-core@0.1.0.3/relation_types.bend as T
import bendvy-ecs-core@0.1.0.3/execution_command_permission.bend as Permission
import bendvy-ecs-core@0.1.0.3/execution_relation_resource_snapshot.bend as Snapshot

37def find(-S:Data,+descriptor:T.Descriptor<S>,views:List<&2,Snapshot.GraphView<S>>) -> Maybe<&2,Snapshot.GraphView<S>>:
38  match views:
39    case []:None{}
40    case Snapshot.GraphView{route,+other,namespace,graph} <> rest:Bool.pick(Maybe<&2,Snapshot.GraphView<S>>,Permission.same_descriptor(S,descriptor,other),Some{Snapshot.GraphView{route,other,namespace,graph}},find(S,descriptor,rest))

Uses (6)

Used by (2)