SwiftUI: restrict extension to custom view struct / return custom view type – Ios swift
What I want to achieve: CustomView() .doSomething() // ← should only be available on CustomView .doSomethingElse() // ← should only be available on CustomView AnyOtherView() .doSomething() // ← should not compile Pretty much like SwiftUI's Text implementation has that exact…