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§
Sourceunsafe fn createContextForIdentifier_parentContext_parentIdentifierPath(
&self,
identifier: &NSString,
parent_context: &CLSContext,
parent_identifier_path: &NSArray<NSString>,
) -> Option<Retained<CLSContext>>
Available on crate features CLSContext
and CLSObject
only.
unsafe fn createContextForIdentifier_parentContext_parentIdentifierPath( &self, identifier: &NSString, parent_context: &CLSContext, parent_identifier_path: &NSArray<NSString>, ) -> Option<Retained<CLSContext>>
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.