objc2-mail-kit 0.3.2

Bindings to the MailKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;

use crate::*;

extern_class!(
    /// An instance of this class can be used to change the visual style of recipeint email address token when user in composing a mail message.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/mailkit/meaddressannotation?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    pub struct MEAddressAnnotation;
);

extern_conformance!(
    unsafe impl NSCoding for MEAddressAnnotation {}
);

extern_conformance!(
    unsafe impl NSObjectProtocol for MEAddressAnnotation {}
);

extern_conformance!(
    unsafe impl NSSecureCoding for MEAddressAnnotation {}
);

impl MEAddressAnnotation {
    extern_methods!(
        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new() -> Retained<Self>;

        /// An annotation to denote a recipeint email address has an error when composing a mail message.
        ///
        /// Parameter `localizedDescription`: - A localized string with a brief description of the error that may be presented to the user.
        #[unsafe(method(errorWithLocalizedDescription:))]
        #[unsafe(method_family = none)]
        pub unsafe fn errorWithLocalizedDescription(
            localized_description: &NSString,
        ) -> Retained<MEAddressAnnotation>;

        /// An annotation to warn about a recipeint email address when composing a mail message.
        ///
        /// Parameter `localizedDescription`: - A localized string with a brief description of the warning may be presented to the user. .
        #[unsafe(method(warningWithLocalizedDescription:))]
        #[unsafe(method_family = none)]
        pub unsafe fn warningWithLocalizedDescription(
            localized_description: &NSString,
        ) -> Retained<MEAddressAnnotation>;

        /// An annotation to  denote a valid recipeint email address when composing a mail message.
        ///
        /// Parameter `localizedDescription`: - A localized string with a brief description that may be presented to the user. .
        #[unsafe(method(successWithLocalizedDescription:))]
        #[unsafe(method_family = none)]
        pub unsafe fn successWithLocalizedDescription(
            localized_description: &NSString,
        ) -> Retained<MEAddressAnnotation>;
    );
}