To elaborate, can I have something like below?
let encoder: MTLRenderCommandEncoder
encoder.setCullMode(.front)
encoder.drawPrimitives(*)
encoder.setCullMode(.back)
encoder.drawPrimtives(*)
Yes. All of the "set" methods are there to let you do exactly this. Note the difference between these and the render pass descriptor. You configure a render pass descriptor and then create the render command encoder from it. After that, none of the properties described by the descriptor may be changed on the encoder. But the properties of the encoder itself may be.
In other words, if a property weren't meant to be changed over the lifetime of the encoder, it would be part of the descriptor and there wouldn't be a "set" method for it.