objc2_ml_compute/generated/
MLCPlatform.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// Utility class to set MLCompute global properties
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/mlcompute/mlcplatform?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[deprecated]
17    pub struct MLCPlatform;
18);
19
20extern_conformance!(
21    unsafe impl NSObjectProtocol for MLCPlatform {}
22);
23
24impl MLCPlatform {
25    extern_methods!(
26        /// sets the RNG seed. The seed should be of type long int.
27        #[deprecated]
28        #[unsafe(method(setRNGSeedTo:))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn setRNGSeedTo(seed: &NSNumber);
31
32        /// gets the RNG seed value. If the value is not set it would return nil
33        #[deprecated]
34        #[unsafe(method(getRNGseed))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn getRNGseed() -> Option<Retained<NSNumber>>;
37    );
38}
39
40/// Methods declared on superclass `NSObject`.
41impl MLCPlatform {
42    extern_methods!(
43        #[unsafe(method(init))]
44        #[unsafe(method_family = init)]
45        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
46
47        #[unsafe(method(new))]
48        #[unsafe(method_family = new)]
49        pub unsafe fn new() -> Retained<Self>;
50    );
51}