Trait CLSDataStoreDelegate

Source
pub unsafe trait CLSDataStoreDelegate: NSObjectProtocol {
    // Provided method
    unsafe fn createContextForIdentifier_parentContext_parentIdentifierPath(
        &self,
        identifier: &NSString,
        parent_context: &CLSContext,
        parent_identifier_path: &NSArray<NSString>,
    ) -> Option<Retained<CLSContext>>
       where Self: Sized + Message { ... }
}
Available on crate feature CLSDataStore only.
Expand description

Provided Methods§

Source

unsafe fn createContextForIdentifier_parentContext_parentIdentifierPath( &self, identifier: &NSString, parent_context: &CLSContext, parent_identifier_path: &NSArray<NSString>, ) -> Option<Retained<CLSContext>>
where Self: Sized + Message,

Available on crate features CLSContext and CLSObject only.

Implement to return a new context with the supplied identifier as a child of the parent context.

This method is invoked for missing contexts in:

 -[CLSDataStore contextsMatchingIdentifierPath:completion:]

and

 -[CLSContext descendantMatchingIdentifierPath:completion:]

It will be called successively for each identifier in the path that is not found. This helps centralize context creation in one place.

Note: New contexts returned in this method are automatically saved.

Parameter identifier: Identifier for the new context.

Parameter parentContext: Parent of the new context.

Parameter parentIdentifierPath: Ordered list of identifiers leading to the parent context.

Returns: The new context for the supplied identifier. The new context is automatically saved.

Trait Implementations§

Source§

impl ProtocolType for dyn CLSDataStoreDelegate

Source§

const NAME: &'static str = "CLSDataStoreDelegate"

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 CLSDataStoreDelegate

Implementations on Foreign Types§

Source§

impl<T> CLSDataStoreDelegate for ProtocolObject<T>

Implementors§