objc2_mail_kit/generated/
MEMessageEncodingResult.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    /// Contains information about an outging mail message after any security measures have been applied.
11    ///
12    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/memessageencodingresult?language=objc)
13    #[unsafe(super(NSObject))]
14    #[derive(Debug, PartialEq, Eq, Hash)]
15    pub struct MEMessageEncodingResult;
16);
17
18extern_conformance!(
19    unsafe impl NSCoding for MEMessageEncodingResult {}
20);
21
22extern_conformance!(
23    unsafe impl NSObjectProtocol for MEMessageEncodingResult {}
24);
25
26extern_conformance!(
27    unsafe impl NSSecureCoding for MEMessageEncodingResult {}
28);
29
30impl MEMessageEncodingResult {
31    extern_methods!(
32        #[cfg(feature = "MEEncodedOutgoingMessage")]
33        /// The encoded message. Nil if no need to encode or an error occured while encoding
34        #[unsafe(method(encodedMessage))]
35        #[unsafe(method_family = none)]
36        pub unsafe fn encodedMessage(&self) -> Option<Retained<MEEncodedOutgoingMessage>>;
37
38        /// Any error that occured while attempting to sign the outgoing message.
39        #[unsafe(method(signingError))]
40        #[unsafe(method_family = none)]
41        pub unsafe fn signingError(&self) -> Option<Retained<NSError>>;
42
43        /// Any error that occured while attempting to encrypt the outgoing message.
44        #[unsafe(method(encryptionError))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn encryptionError(&self) -> Option<Retained<NSError>>;
47
48        #[unsafe(method(new))]
49        #[unsafe(method_family = new)]
50        pub unsafe fn new() -> Retained<Self>;
51
52        #[unsafe(method(init))]
53        #[unsafe(method_family = init)]
54        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
55
56        #[cfg(feature = "MEEncodedOutgoingMessage")]
57        #[unsafe(method(initWithEncodedMessage:signingError:encryptionError:))]
58        #[unsafe(method_family = init)]
59        pub unsafe fn initWithEncodedMessage_signingError_encryptionError(
60            this: Allocated<Self>,
61            encoded_message: Option<&MEEncodedOutgoingMessage>,
62            signing_error: Option<&NSError>,
63            encryption_error: Option<&NSError>,
64        ) -> Retained<Self>;
65    );
66}