objc2_authentication_services/generated/
ASPasswordCredential.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    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/aspasswordcredential?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct ASPasswordCredential;
14);
15
16#[cfg(feature = "ASAuthorizationCredential")]
17extern_conformance!(
18    unsafe impl ASAuthorizationCredential for ASPasswordCredential {}
19);
20
21extern_conformance!(
22    unsafe impl NSCoding for ASPasswordCredential {}
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for ASPasswordCredential {}
27);
28
29unsafe impl CopyingHelper for ASPasswordCredential {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSObjectProtocol for ASPasswordCredential {}
35);
36
37extern_conformance!(
38    unsafe impl NSSecureCoding for ASPasswordCredential {}
39);
40
41impl ASPasswordCredential {
42    extern_methods!(
43        /// Initializes an ASPasswordCredential object.
44        ///
45        /// Parameter `user`: the user.
46        ///
47        /// Parameter `password`: the password.
48        #[unsafe(method(initWithUser:password:))]
49        #[unsafe(method_family = init)]
50        pub unsafe fn initWithUser_password(
51            this: Allocated<Self>,
52            user: &NSString,
53            password: &NSString,
54        ) -> Retained<Self>;
55
56        /// Creates and initializes a new ASPasswordCredential object.
57        ///
58        /// Parameter `user`: the user.
59        ///
60        /// Parameter `password`: the password.
61        #[unsafe(method(credentialWithUser:password:))]
62        #[unsafe(method_family = none)]
63        pub unsafe fn credentialWithUser_password(
64            user: &NSString,
65            password: &NSString,
66        ) -> Retained<Self>;
67
68        /// The user name of this credential.
69        ///
70        /// Returns: The user string.
71        #[unsafe(method(user))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn user(&self) -> Retained<NSString>;
74
75        /// The password of this credential.
76        ///
77        /// Returns: The password string.
78        #[unsafe(method(password))]
79        #[unsafe(method_family = none)]
80        pub unsafe fn password(&self) -> Retained<NSString>;
81    );
82}
83
84/// Methods declared on superclass `NSObject`.
85impl ASPasswordCredential {
86    extern_methods!(
87        #[unsafe(method(init))]
88        #[unsafe(method_family = init)]
89        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
90
91        #[unsafe(method(new))]
92        #[unsafe(method_family = new)]
93        pub unsafe fn new() -> Retained<Self>;
94    );
95}