Trait MFMailComposeViewControllerDelegate

Source
pub unsafe trait MFMailComposeViewControllerDelegate: NSObjectProtocol {
    // Provided method
    unsafe fn mailComposeController_didFinishWithResult_error(
        &self,
        controller: &MFMailComposeViewController,
        result: MFMailComposeResult,
        error: Option<&NSError>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature MFMailComposeViewController only.
Expand description

Protocol for delegate callbacks to MFMailComposeViewController instances.

This protocol must be implemented for delegates of MFMailComposeViewController instances. It will be called at various times while the user is composing, sending, saving, or canceling email composition.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn mailComposeController_didFinishWithResult_error( &self, controller: &MFMailComposeViewController, result: MFMailComposeResult, error: Option<&NSError>, )
where Self: Sized + Message,

Available on crate feature objc2-ui-kit only.

Delegate callback which is called upon user’s completion of email composition.

This delegate callback will be called when the user completes the email composition. How the user chose to complete this task will be given as one of the parameters to the callback. Upon this call, the client should remove the view associated with the controller, typically by dismissing modally.

Parameter controller: The MFMailComposeViewController instance which is returning the result.

Parameter result: MFMailComposeResult indicating how the user chose to complete the composition process.

Parameter error: NSError indicating the failure reason if failure did occur. This will be nil if result did not indicate failure.

Trait Implementations§

Source§

impl ProtocolType for dyn MFMailComposeViewControllerDelegate

Source§

const NAME: &'static str = "MFMailComposeViewControllerDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn MFMailComposeViewControllerDelegate

Implementations on Foreign Types§

Source§

impl<T> MFMailComposeViewControllerDelegate for ProtocolObject<T>

Implementors§