Question: I have a `Transaction` protocol. Implemented by a few structs: `Income`, `Expense`, etc..

I then have a generic `TransactionMananger` class:

```swift
class TransactionManager<T:Transaction>: ObservableObject {
    private let key:String = String(describing: T.self)
    @Published var items: [T]
    // ...

```

That works fine.

Now I'm trying to build a view, that will receive a `TransactionManager` of any type (incomes, expenses, whatever).

```swift
struct TransactionView: View {
    @ObservedObject var manager: TransactionManager<???>

    var body: some View {
        Text("Hello")
    }
}

```

I don't know how to specify this should be of any `Transaction`. When I use `Transaction` itself the compiler says: 

> 
> Value of protocol type 'Transaction' cannot conform to 'Transaction'; only struct/enum/class types can conform to protocols
> 
> 
>

Answer: 
If you set manager via `TransactionView` constructor then you can do something like this

```
struct TransactionView<T:Transaction>: View {

    @ObservedObject var manager: TransactionManager<T>

    var body: some View {
         Text("Hello")
    }
}

```
You need to give a concrete type that conforms to the protocol `Transaction` here, only workaround is to make multiple managers for each type of protocol.

```swift
@ObservedObject private var incomeManager: TransactionManager<Income>
@ObservedObject private var expenseManager: TransactionManager<Expense>

```