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
20unsafe impl NSCoding for MXSignpostRecord {}
21
22unsafe impl NSObjectProtocol for MXSignpostRecord {}
23
24unsafe impl NSSecureCoding for MXSignpostRecord {}
25
26impl MXSignpostRecord {
27    extern_methods!(
28        /// An NSString representation of the subsystem of the signpost instance.
29        #[unsafe(method(subsystem))]
30        #[unsafe(method_family = none)]
31        pub unsafe fn subsystem(&self) -> Retained<NSString>;
32
33        /// An NSString representation of the category of the signpost instance.
34        #[unsafe(method(category))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn category(&self) -> Retained<NSString>;
37
38        /// An NSString representation of the name of the signpost instance.
39        #[unsafe(method(name))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn name(&self) -> Retained<NSString>;
42
43        /// An NSDate representation of the begin time stamp of the signpost instance.
44        #[unsafe(method(beginTimeStamp))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn beginTimeStamp(&self) -> Retained<NSDate>;
47
48        /// An NSDate representation of the end time stamp of the signpost instances which are intervals and will be nil for signpost events.
49        #[unsafe(method(endTimeStamp))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn endTimeStamp(&self) -> Option<Retained<NSDate>>;
52
53        /// An NSMeasurement representing the duration in milliseconds of signpost instances which are intervals and will be nil for signpost events.
54        #[unsafe(method(duration))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn duration(&self) -> Option<Retained<NSMeasurement<NSUnitDuration>>>;
57
58        /// A BOOL denoting whether the signpost instance is an interval or not..
59        #[unsafe(method(isInterval))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn isInterval(&self) -> bool;
62
63        /// Convenience method to return a JSON representation of this SignpostRecord.
64        ///
65        /// Returns: An NSData object containing the JSON representation
66        #[unsafe(method(JSONRepresentation))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn JSONRepresentation(&self) -> Retained<NSData>;
69
70        /// Convenience method to return a NSDictionary representation of this SignpostRecord.
71        ///
72        /// Returns: An NSDictionary object containing the dictionary representation
73        #[unsafe(method(dictionaryRepresentation))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn dictionaryRepresentation(&self) -> Retained<NSDictionary>;
76    );
77}
78
79/// Methods declared on superclass `NSObject`.
80impl MXSignpostRecord {
81    extern_methods!(
82        #[unsafe(method(init))]
83        #[unsafe(method_family = init)]
84        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85
86        #[unsafe(method(new))]
87        #[unsafe(method_family = new)]
88        pub unsafe fn new() -> Retained<Self>;
89    );
90}