title: Alternate approach to inheritance for Swift structs?
body: <p>I'm using structs instead of classes to store data in my iOS app because of the obvious advantage of value vs reference types. However, I'm trying to figure out how to architect groups of similar content. User posts may consist of images, text, and/or titles. If I were using classes the approach I would use is having a common <code>Post</code> superclass with different subclasses representing different types of posts. That way I could pass <code>Post</code> data around and cast as needed. However, structs don't allow for inheritance, so how could I architect something similar?</p>