I am trying to create an optional dataSource which will expect to receive a structure. So I did below.
struct Configuration {
var color = UIColor.grayColor()
var width: CGFloat = 10
}
@objc protocol CustomDataSource {
optional func configuration() -> Configuration
}
but as the result type is not Objective-C type so it's throws an error like below.

I don't want to make this dataSource as required but if its been implement then it must return that structure. I can create custom class to do the same. But is it possible by structure?