Skip to main content

MEExtension

Trait MEExtension 

Source
pub unsafe trait MEExtension: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    unsafe fn handlerForComposeSession(
        &self,
        session: &MEComposeSession,
    ) -> Retained<ProtocolObject<dyn MEComposeSessionHandler>>
       where Self: Sized + Message { ... }
    unsafe fn handlerForMessageActions(
        &self,
    ) -> Retained<ProtocolObject<dyn MEMessageActionHandler>>
       where Self: Sized + Message { ... }
    unsafe fn handlerForContentBlocker(
        &self,
    ) -> Retained<ProtocolObject<dyn MEContentBlocker>>
       where Self: Sized + Message { ... }
    unsafe fn handlerForMessageSecurity(
        &self,
    ) -> Retained<ProtocolObject<dyn MEMessageSecurityHandler>>
       where Self: Sized + Message { ... }
}
Available on crate feature MEExtension only.
Expand description

A protocol which must be adopted by the class set as extension’s NSExtensionPrincipalClass.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn handlerForComposeSession( &self, session: &MEComposeSession, ) -> Retained<ProtocolObject<dyn MEComposeSessionHandler>>
where Self: Sized + Message,

Available on crate feature MEComposeSession only.

A factory method for returning an instance of MEComposeSessionHandler Parameter session: An instance of MEComposeSessionthat represents a mail compose window.

Source

unsafe fn handlerForMessageActions( &self, ) -> Retained<ProtocolObject<dyn MEMessageActionHandler>>
where Self: Sized + Message,

Available on crate feature MEMessageActionHandler only.

A factory method for returning an instance of MEMessageActionHandler

Source

unsafe fn handlerForContentBlocker( &self, ) -> Retained<ProtocolObject<dyn MEContentBlocker>>
where Self: Sized + Message,

Available on crate feature MEContentBlocker only.

A factory method for returning an instance of MEContentBlocker

Source

unsafe fn handlerForMessageSecurity( &self, ) -> Retained<ProtocolObject<dyn MEMessageSecurityHandler>>
where Self: Sized + Message,

Available on crate features MEMessageDecoder and MEMessageEncoder and MEMessageSecurityHandler only.

A factory method for returning an instance of MEMessageSecurityHandler

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn MEExtension
where T: ?Sized + Message + MEExtension,

Source§

impl ProtocolType for dyn MEExtension

Source§

const NAME: &'static str = "MEExtension"

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> MEExtension for ProtocolObject<T>
where T: ?Sized + MEExtension,

Implementors§