AnyVehicleUpdateObserver
public class AnyVehicleUpdateObserver : VehicleUpdateObserver
extension AnyVehicleUpdateObserver: Identifiable, Hashable
Wrapper that provides the possibility to react on vehicle parameters updates.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Initializes
VehicleUpdateObserver
wrapper.Declaration
Swift
public init<VehicleObserver>(_ observer: VehicleObserver) where VehicleObserver : VehicleUpdateObserver
-
Called when the active vehicle has been updated.
Declaration
Swift
public func onVehicleUpdate(_ vehicle: Vehicle)
Parameters
vehicle
Vehicle
that has been updated.
-
AnyVehicleUpdateObserver
hash method implementation.Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Compares two instances of
AnyVehicleUpdateObserver
for equality.Declaration
Swift
public static func == (lhs: AnyVehicleUpdateObserver, rhs: AnyVehicleUpdateObserver) -> Bool