pub unsafe trait MEMessageEncoder: NSObjectProtocol {
// Provided methods
unsafe fn getEncodingStatusForMessage_composeContext_completionHandler(
&self,
message: &MEMessage,
compose_context: &MEComposeContext,
completion_handler: &DynBlock<dyn Fn(NonNull<MEOutgoingMessageEncodingStatus>)>,
)
where Self: Sized + Message { ... }
unsafe fn encodeMessage_composeContext_completionHandler(
&self,
message: &MEMessage,
compose_context: &MEComposeContext,
completion_handler: &DynBlock<dyn Fn(NonNull<MEMessageEncodingResult>)>,
)
where Self: Sized + Message { ... }
}MEMessageEncoder only.Expand description
Methods in this protocol can be used by a mail app extension to encode messages.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn getEncodingStatusForMessage_composeContext_completionHandler(
&self,
message: &MEMessage,
compose_context: &MEComposeContext,
completion_handler: &DynBlock<dyn Fn(NonNull<MEOutgoingMessageEncodingStatus>)>,
)
Available on crate features MEComposeContext and MEMessage and MEOutgoingMessageEncodingStatus and block2 only.
unsafe fn getEncodingStatusForMessage_composeContext_completionHandler( &self, message: &MEMessage, compose_context: &MEComposeContext, completion_handler: &DynBlock<dyn Fn(NonNull<MEOutgoingMessageEncodingStatus>)>, )
MEComposeContext and MEMessage and MEOutgoingMessageEncodingStatus and block2 only.This is invoked while a message is being composed. This will be be invoked each time the sending address or the list of recipients changes. The supplied
messagewill contain the email address of the sender, the recipient email addresses, and
the message data being sent. The completion handler should be called with the current encoding status of the message indicating whether the message is able to be signed, encrypted, both or neither. The result will also contain any error that occured, including a list of any recipients whose encryption keys are expected and missing.
Parameter message: - The outgoing message to apply any security mechanisms on.
Parameter composeContext: -
MEComposeContextinstance which corresponds to the
messagebeing composed.
Sourceunsafe fn encodeMessage_composeContext_completionHandler(
&self,
message: &MEMessage,
compose_context: &MEComposeContext,
completion_handler: &DynBlock<dyn Fn(NonNull<MEMessageEncodingResult>)>,
)
Available on crate features MEComposeContext and MEMessage and MEMessageEncodingResult and block2 only.
unsafe fn encodeMessage_composeContext_completionHandler( &self, message: &MEMessage, compose_context: &MEComposeContext, completion_handler: &DynBlock<dyn Fn(NonNull<MEMessageEncodingResult>)>, )
MEComposeContext and MEMessage and MEMessageEncodingResult and block2 only.This is invoked when an outgoing message is sent. The supplied
messagewill contain the email address of the sender, the recipient email addresses, and
the message data being sent. The completion handler should be called with the
resultof applying any encoding if needed based on
shouldSignand
shouldEncrypt.If the
resultis not encrypted or signed and does not have any errors, it is assumed the message did not need a signature or encryption applied. In this case the
datafor the result will be ignored.
Parameter message: - The outgoing message to apply any security mechanisms on.
Parameter composeContext: -
MEComposeContextinstance which corresponds to the
messagebeing composed.