objc2_car_play/generated/
CPRouteInformation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// CPRouteInformation describes information pertaining to a route that is necessary for rerouting.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/carplay/cprouteinformation?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct CPRouteInformation;
16);
17
18unsafe impl Send for CPRouteInformation {}
19
20unsafe impl Sync for CPRouteInformation {}
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for CPRouteInformation {}
24);
25
26impl CPRouteInformation {
27    extern_methods!(
28        #[cfg(all(
29            feature = "CPLaneGuidance",
30            feature = "CPManeuver",
31            feature = "CPTravelEstimates"
32        ))]
33        /// Initialize a CPRouteInformation object with maneuvers, lane guidances, the current maneuvers, the current lane guidance, and trip and current maneuver travel estimates.
34        #[unsafe(method(initWithManeuvers:laneGuidances:currentManeuvers:currentLaneGuidance:tripTravelEstimates:maneuverTravelEstimates:))]
35        #[unsafe(method_family = init)]
36        pub unsafe fn initWithManeuvers_laneGuidances_currentManeuvers_currentLaneGuidance_tripTravelEstimates_maneuverTravelEstimates(
37            this: Allocated<Self>,
38            maneuvers: &NSArray<CPManeuver>,
39            lane_guidances: &NSArray<CPLaneGuidance>,
40            current_maneuvers: &NSArray<CPManeuver>,
41            current_lane_guidance: &CPLaneGuidance,
42            trip_travel_estimates: &CPTravelEstimates,
43            maneuver_travel_estimates: &CPTravelEstimates,
44        ) -> Retained<Self>;
45
46        #[unsafe(method(init))]
47        #[unsafe(method_family = init)]
48        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
49
50        #[cfg(feature = "CPManeuver")]
51        /// maneuvers is an array of CPManeuver objects, each describes a single maneuver.
52        ///
53        /// This property is not atomic.
54        ///
55        /// # Safety
56        ///
57        /// This might not be thread-safe.
58        #[unsafe(method(maneuvers))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn maneuvers(&self) -> Retained<NSArray<CPManeuver>>;
61
62        #[cfg(feature = "CPLaneGuidance")]
63        /// laneGuidances is an array of CPLaneGuidance objects, each describes a single lane guidance.
64        ///
65        /// This property is not atomic.
66        ///
67        /// # Safety
68        ///
69        /// This might not be thread-safe.
70        #[unsafe(method(laneGuidances))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn laneGuidances(&self) -> Retained<NSArray<CPLaneGuidance>>;
73
74        #[cfg(feature = "CPManeuver")]
75        /// currentManeuvers is an array of CPManeuver objects, describing the current maneuvers.
76        ///
77        /// This property is not atomic.
78        ///
79        /// # Safety
80        ///
81        /// This might not be thread-safe.
82        #[unsafe(method(currentManeuvers))]
83        #[unsafe(method_family = none)]
84        pub unsafe fn currentManeuvers(&self) -> Retained<NSArray<CPManeuver>>;
85
86        #[cfg(feature = "CPLaneGuidance")]
87        /// currentLaneGuidance is a CPLaneGuidance object, describing the current lane guidance.
88        ///
89        /// This property is not atomic.
90        ///
91        /// # Safety
92        ///
93        /// This might not be thread-safe.
94        #[unsafe(method(currentLaneGuidance))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn currentLaneGuidance(&self) -> Retained<CPLaneGuidance>;
97
98        #[cfg(feature = "CPTravelEstimates")]
99        /// tripTravelEstimates is a CPTravelEstimates object, describing the travel estimates for the current trip.
100        ///
101        /// This property is not atomic.
102        ///
103        /// # Safety
104        ///
105        /// This might not be thread-safe.
106        #[unsafe(method(tripTravelEstimates))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn tripTravelEstimates(&self) -> Retained<CPTravelEstimates>;
109
110        #[cfg(feature = "CPTravelEstimates")]
111        /// maneuverTravelEstimates is a CPTravelEstimates object, describing the travel estimates for the first maneuver in the list of current maneuvers.
112        ///
113        /// This property is not atomic.
114        ///
115        /// # Safety
116        ///
117        /// This might not be thread-safe.
118        #[unsafe(method(maneuverTravelEstimates))]
119        #[unsafe(method_family = none)]
120        pub unsafe fn maneuverTravelEstimates(&self) -> Retained<CPTravelEstimates>;
121    );
122}
123
124/// Methods declared on superclass `NSObject`.
125impl CPRouteInformation {
126    extern_methods!(
127        #[unsafe(method(new))]
128        #[unsafe(method_family = new)]
129        pub unsafe fn new() -> Retained<Self>;
130    );
131}