IdentifiedComponentWrapper

public struct IdentifiedComponentWrapper<ID, Wrapped> : ComponentWrapping, IdentifiableComponent where ID : Hashable, Wrapped : Component

A wrapper around the compoent to conform to IdentifiableComponent.

  • id

    A type that represents an id that used to uniquely identify the component.

    Declaration

    Swift

    public var id: ID
  • The wrapped component instance.

    Declaration

    Swift

    public var wrapped: Wrapped
  • Create a component wrapper wrapping given id and component.

    Declaration

    Swift

    @inlinable
    public init(id: ID, wrapped: Wrapped)

    Parameters

    id

    An identifier to be wrapped.

    wrapped

    A compoennt instance to be wrapped.