Last active
August 29, 2015 14:26
-
-
Save waltflanagan/b385782bd8ff2b4295ce to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func ingest<T:Ingestable, U where U:Persistable, U:SwiftyMeragable, U:NSManagedObject>(ingestables: [T]?, completion: ( persistedObjects:[U] )->Void) { | |
} | |
func ingest<T where T:Ingestable, T.IngestedType:Persistable, T.IngestedType:SwiftyMeragable, T.IngestedType:NSManagedObject>(ingestables: [T]?, completion: (( persistedObjects:[NSManagedObjectID] )->Void)? = nil) { | |
} | |
internal protocol Ingestable : SwiftySerializable { | |
typealias IngestedType | |
func fetchRequestForUniquing() -> NSFetchRequest? | |
} | |
extension TransientUser : Ingestable { | |
typealias IngestedType = PersistentUser | |
func fetchRequestForUniquing() -> NSFetchRequest? {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment