DangerousGoodsRestrictionElement

public struct DangerousGoodsRestrictionElement : HorizonElement

HorizonElement that contains data about a dangerous goods restriction.

To receive such elements in the HorizonSnapshot, specify HorizonElementType.dangerousGoodsRestrictionType in the HorizonOptions that you register with the HorizonEngine:

let horizonOptions = HorizonOptions(
    id: UUID(),
    elementTypes: [.dangerousGoodsRestrictionType],
    ...
)

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • Creates a single instance of a horizon element that specifies dangerous goods restrictions.

    Declaration

    Swift

    public init(
        id: Int,
        pathID: Int,
        startOffset: Measurement<UnitLength>,
        endOffset: Measurement<UnitLength>,
        restrictions: [RestrictionData]
    )

    Parameters

    id

    The unique ID of the horizon element.

    pathID

    The id of the path to which this element belongs.

    startOffset

    Indicates the start offset along the path this data applies to.

    endOffset

    Indicates the end offset along the path this data applies to.

    restrictions

    A list of dangerous goods restrictions.

RestrictionData

  • Data for a single dangerous goods restriction.

    See more

    Declaration

    Swift

    public struct RestrictionData

RestrictionType