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
-
Represents the
3mfsubtype.Declaration
Swift
case _3mf(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
e57subtype.Declaration
Swift
case e57(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
examplesubtype.Declaration
Swift
case example(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
gltf-binarysubtype.Declaration
Swift
case gltfBinary(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
gltfsubtype.Declaration
Swift
case gltf(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
igessubtype.Declaration
Swift
case iges(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
meshsubtype.Declaration
Swift
case mesh(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
mtlsubtype.Declaration
Swift
case mtl(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
objsubtype.Declaration
Swift
case obj(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
stepsubtype.Declaration
Swift
case step(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
step-xmlsubtype.Declaration
Swift
case stepXml(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
stlsubtype.Declaration
Swift
case stl(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
vrmlsubtype.Declaration
Swift
case vrml(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
x3d-vrmlsubtype.Declaration
Swift
case x3dVrml(_: Suffix? = nil, _: Parameters? = nil) -
Represents the
x3dsubtype.Declaration
Swift
case x3d(_: Suffix? = nil, _: Parameters? = nil) -
Represents a subtype that does not fit in the other cases or is currently not officially defined.
You can use this case to define an arbitrary, unregistered subtype with the given name or to represent a subtype in the non standard tree, e.g. vendor tree or personal tree.
Optionally, you can specify a
SuffixandParameters.Declaration
Swift
case other(String, _: Suffix? = nil, _: Parameters? = nil) -
Declaration
Swift
case anything(_: Suffix? = nil, _: Parameters? = nil) -
Declaration
Swift
public var description: String { get } -
Declaration
Swift
public init(rawValue: String) -
Declaration
Swift
public var rawValue: String { get } -
Declaration
Swift
public var type: MediaType { get } -
Declaration
Swift
public static func == (lhs: `Self`, rhs: `Self`) -> Bool -
Declaration
Swift
public func hash(into hasher: inout Hasher)