objc2_metric_kit/generated/
MXSignpostRecord.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    /// A class that represents a record of signpost instance.
11    ///
12    /// Signpost instances are either Signpost intervals or events and MXSignpostRecord captures information reagarding such signpost instances
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/metrickit/mxsignpostrecord?language=objc)
15    #[unsafe(super(NSObject))]
16    #[derive(Debug, PartialEq, Eq, Hash)]
17    pub struct MXSignpostRecord;
18);
19
20extern_conformance!(
21    unsafe impl NSCoding for MXSignpostRecord {}
22);
23
24extern_conformance!(
25    unsafe impl NSObjectProtocol for MXSignpostRecord {}
26);
27
28extern_conformance!(
29    unsafe impl NSSecureCoding for MXSignpostRecord {}
30);
31
32impl MXSignpostRecord {
33    extern_methods!(
34        /// An NSString representation of the subsystem of the signpost instance.
35        #[unsafe(method(subsystem))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn subsystem(&self) -> Retained<NSString>;
38
39        /// An NSString representation of the category of the signpost instance.
40        #[unsafe(method(category))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn category(&self) -> Retained<NSString>;
43
44        /// An NSString representation of the name of the signpost instance.
45        #[unsafe(method(name))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn name(&self) -> Retained<NSString>;
48
49        /// An NSDate representation of the begin time stamp of the signpost instance.
50        #[unsafe(method(beginTimeStamp))]
51        #[unsafe(method_family = none)]
52        pub unsafe fn beginTimeStamp(&self) -> Retained<NSDate>;
53
54        /// An NSDate representation of the end time stamp of the signpost instances which are intervals and will be nil for signpost events.
55        #[unsafe(method(endTimeStamp))]
56        #[unsafe(method_family = none)]
57        pub unsafe fn endTimeStamp(&self) -> Option<Retained<NSDate>>;
58
59        /// An NSMeasurement representing the duration in milliseconds of signpost instances which are intervals and will be nil for signpost events.
60        #[unsafe(method(duration))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn duration(&self) -> Option<Retained<NSMeasurement<NSUnitDuration>>>;
63
64        /// A BOOL denoting whether the signpost instance is an interval or not..
65        #[unsafe(method(isInterval))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn isInterval(&self) -> bool;
68
69        /// Convenience method to return a JSON representation of this SignpostRecord.
70        ///
71        /// Returns: An NSData object containing the JSON representation
72        #[unsafe(method(JSONRepresentation))]
73        #[unsafe(method_family = none)]
74        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
75
76        /// Convenience method to return a NSDictionary representation of this SignpostRecord.
77        ///
78        /// Returns: An NSDictionary object containing the dictionary representation
79        #[unsafe(method(dictionaryRepresentation))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
82    );
83}
84
85/// Methods declared on superclass `NSObject`.
86impl MXSignpostRecord {
87    extern_methods!(
88        #[unsafe(method(init))]
89        #[unsafe(method_family = init)]
90        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92        #[unsafe(method(new))]
93        #[unsafe(method_family = new)]
94        pub unsafe fn new() -> Retained<Self>;
95    );
96}