One Logo Pool Ball
CoreML · IOS API REFERENCE

MLSendableFeatureValue

struct · iOS 18.0+ · SDK 27.1

struct MLSendableFeatureValue

A sendable feature value. This version of feature value is similar to ``MLFeatureValue`` but it can be passed across concurrency domains. Once in the target concurrency domain, you can then convert it to a ``MLFeatureValue``.

Members (28)

method · iOS 18.0+

shapedArrayValue

TypeScript
shapedArrayValue(type: "Double" | "Float"): (MLShapedArray<unknown>) | null
Swift declaration
func shapedArrayValue<Scalar>(of type: Scalar.Type) -> MLShapedArray<Scalar>? where Scalar : MLShapedArrayScalar

Returns the shaped array value, if the contained value is a shaped array of the specified type.

get · iOS 18.0+

stringArrayValue

TypeScript
get stringArrayValue(): (Array<string>) | null
Swift declaration
var stringArrayValue: [String]? { get }

The string array value, if the contained value is an array of string.

get · iOS 18.0+

stringDictionaryValue

TypeScript
get stringDictionaryValue(): (Record<string, number>) | null
Swift declaration
var stringDictionaryValue: [String : Double]? { get }

The string dictionary value, if the contained value is a dictionary of strings to numbers.

get · iOS 18.0+

integerDictionaryValue

TypeScript
get integerDictionaryValue(): (Record<number, number>) | null
Swift declaration
var integerDictionaryValue: [Int : Double]? { get }

The integer dictionary value, if the contained value is a dictionary of integers to numbers.

get · iOS 18.0+

floatValue

TypeScript
get floatValue(): (number) | null
Swift declaration
var floatValue: Float? { get }

The single-precision floating-point value, if the contained value is a float.

get · iOS 18.0+

doubleValue

TypeScript
get doubleValue(): (number) | null
Swift declaration
var doubleValue: Double? { get }

The double-precision floating-point value, if the contained value is a double.

get · iOS 18.0+

stringValue

TypeScript
get stringValue(): (string) | null
Swift declaration
var stringValue: String? { get }

The string value, if the contained value is a string.

get · iOS 18.0+

float16Value

TypeScript
get float16Value(): (number) | null
Swift declaration
var float16Value: Float16? { get }

The 16-bit floating-point value, if the contained value is a 16-bit float.

get · iOS 18.0+

integerValue

TypeScript
get integerValue(): (number) | null
Swift declaration
var integerValue: Int? { get }

The integer value, if the contained value is an integer.

get · iOS 18.0+

isUndefined

TypeScript
get isUndefined(): boolean
Swift declaration
var isUndefined: Bool { get }

A Boolean value indicating whether the value is missing or undefined.

get · iOS 18.0+

isShapedArray

TypeScript
get isShapedArray(): boolean
Swift declaration
var isShapedArray: Bool { get }

A Boolean value indicating whether the value is a shaped array.

get · iOS 18.0+

debugDescription

TypeScript
get debugDescription(): string
Swift declaration
var debugDescription: String { get }

A textual representation of this instance, suitable for debugging. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(reflecting:)` initializer. This initializer works with any type, and uses the custom `debugDescription` property for types that conform to `CustomDebugStringConvertible`: struct Point: CustomDebugStringConvertible { let x: Int, y: Int var debugDescription: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(reflecting: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `debugDescription` property.

get · iOS 18.0+

type

TypeScript
get type(): MLFeatureType
Swift declaration
var type: MLFeatureType { get }

The type of value.

get · iOS 18.0+

isScalar

TypeScript
get isScalar(): boolean
Swift declaration
var isScalar: Bool { get }

A Boolean value indicating whether the value is a single number.

init · iOS 18.0+

init

TypeScript
static initUndefined(type: MLFeatureType): MLSendableFeatureValue
Swift declaration
init(undefined type: MLFeatureType)

Creates an undefined feature value of a specific type.

init · iOS 18.0+

init

TypeScript
static init(value: Record<number, number>): MLSendableFeatureValue
Swift declaration
init(_ value: [Int : Int])

Creates a feature value containing a dictionary of integers to integers.

init · iOS 18.0+

init

TypeScript
static init43385(value: Record<string, number>): MLSendableFeatureValue
Swift declaration
init(_ value: [String : Double])

Creates a feature value containing a dictionary of strings to doubles.

init · iOS 18.0+

init

TypeScript
static init23582(value: Record<string, number>): MLSendableFeatureValue
Swift declaration
init(_ value: [String : Int])

Creates a feature value containing a dictionary of strings to integers.

init · iOS 18.0+

init

TypeScript
static init80083(value: Record<number, number>): MLSendableFeatureValue
Swift declaration
init(_ value: [Int : Double])

Creates a feature value containing a dictionary of integers to doubles.

init · iOS 18.0+

init

TypeScript
static init583(value: string): MLSendableFeatureValue
Swift declaration
init(_ value: String)

Creates a feature value containing a string value.

init · iOS 18.0+

init

TypeScript
static init52967(value: Array<string>): MLSendableFeatureValue
Swift declaration
init(_ value: [String])

Creates a feature value containing an array of string values.

init · iOS 18.0+

init

TypeScript
static init35792(value: number): MLSendableFeatureValue
Swift declaration
init(_ value: Double)

Creates a feature value containing a double-precision floating-point value.

init · iOS 18.0+

init

TypeScript
static init63570(value: number): MLSendableFeatureValue
Swift declaration
init(_ value: Float)

Creates a feature value containing a single-precision floating-point value.

init · iOS 18.0+

init

TypeScript
static init76659(value: MLFeatureValue): (MLSendableFeatureValue) | null
Swift declaration
init?(_ value: MLFeatureValue)

Creates a sendable feature value from a feature value. Some feature values are not representable as a sendable values. In those cases this initializer will return `nil`.

init · iOS 18.0+

init

TypeScript
static init22541(value: number): MLSendableFeatureValue
Swift declaration
init(_ value: Int)

Creates a feature value containing an integer.

init · iOS 18.0+

init

TypeScript
static init89631(value: number): MLSendableFeatureValue
Swift declaration
init(_ value: Int32)

Creates a feature value containing an integer.

init · iOS 18.0+

init

TypeScript
static init63256(value: number): MLSendableFeatureValue
Swift declaration
init(_ value: Float16)

Creates a feature value containing a 16-bit floating-point value.

init · iOS 18.0+

init

TypeScript
static init70181(value: MLShapedArray<number>): MLSendableFeatureValue
Swift declaration
init<Scalar>(_ value: MLShapedArray<Scalar>) where Scalar : MLShapedArrayScalar

Creates a feature value containing a shaped array.

Skipped declarations

No declarations were skipped in this snapshot.

All CoreML types →