Speaking purely technically, no, this is not supported in Swift.
If you do really want to achieve this, you can approach it in the following way:
Read Only
var content: String {
return m.content
}
Read/Write
var content: String {
get {
return m.content
}
set {
m.content = newValue
}
}
All of this though, should have you asking, do you really NEED to do this? Does this really give you anything that just accessing m.content
directly wouldn’t already give you?