Model

public enum Model
extension Model: CustomStringConvertible
extension Model: RawRepresentable
extension Model: MediaSubtype
extension Model: Hashable

Represents the model media type. See the official documentation for details.

You typically use Model as a MediaType.

let model = Model.step()
let mediaType = MediaType.model(model) // Creates: model/step

You can use standard switch statement to access model values.

func isSupported(model: Model) -> Bool {
  switch model {
  case .step, .iges: return true
  default: return false
  }
}

isSupported(audio: .step()) // Returns: true
isSupported(audio: .iges()) // Returns: true
isSupported(audio: .mesh()) // Returns: false

See also

MediaType