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
3mf
subtype.Declaration
Swift
case _3mf(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
e57
subtype.Declaration
Swift
case e57(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
example
subtype.Declaration
Swift
case example(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
gltf-binary
subtype.Declaration
Swift
case gltfBinary(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
gltf
subtype.Declaration
Swift
case gltf(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
iges
subtype.Declaration
Swift
case iges(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
mesh
subtype.Declaration
Swift
case mesh(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
mtl
subtype.Declaration
Swift
case mtl(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
obj
subtype.Declaration
Swift
case obj(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
step
subtype.Declaration
Swift
case step(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
step-xml
subtype.Declaration
Swift
case stepXml(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
stl
subtype.Declaration
Swift
case stl(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
vrml
subtype.Declaration
Swift
case vrml(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
x3d-vrml
subtype.Declaration
Swift
case x3dVrml(_: Suffix? = nil, _: Parameters? = nil)
-
Represents the
x3d
subtype.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
Suffix
andParameters
.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)