HorizonResult
public struct HorizonResult
Output of the HorizonEngine
.
Entry of horizon result is consisted of one HorizonSnapshot
,
HorizonPosition
and set of previously registered HorizonOptions
.
HorizonSnapshot
holds current snapshot of horizon which includes available
paths, status of the horizon snapshot and ID of the main path. Horizon result additionally
contains HorizonOptions
provided by user and HorizonPosition
representing
current position. Both HorizonOptions
and HorizonPosition
determine
contents of the HorizonSnapshot
.
Horizon results can be obtained by creating instance of HorizonEngine
, registering
desired HorizonOptions
with call HorizonEngine
.registerHorizonOptions
and making direct request to generate horizon HorizonEngine
.generateHorizon
providing HorizonOptions
and current NavigationSnapshot
.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes instance of
HorizonResult
.Declaration
Swift
public init( horizonOptions: HorizonOptions, snapshot: HorizonSnapshot, position: HorizonPosition )
Parameters
horizonOptions
The requested options for this result.
snapshot
The HorizonSnapshot for the requested options.
position
The HorizonPosition generated by the horizon engine.
-
The requested options for this result.
Declaration
Swift
public let horizonOptions: HorizonOptions
-
The HorizonSnapshot for the requested options.
Declaration
Swift
public let snapshot: HorizonSnapshot
-
The HorizonPosition generated by the horizon engine.
Declaration
Swift
public let position: HorizonPosition