#[repr(transparent)]pub struct MLModelError(pub NSInteger);
MLModelError
only.Expand description
MLModelError defines the set of MLModel related error codes.
The framework communicates the error code to the application through NSError’s code property. The application could use the error code to present an helpful error message to the user or to diagnose the problem.
See also NSError’s localizedDescription property, which often contains more detailed information.
See also Apple’s documentation
Tuple Fields§
§0: NSInteger
Implementations§
Source§impl MLModelError
impl MLModelError
Sourcepub const Generic: Self
pub const Generic: Self
Core ML throws/returns this error when the framework encounters an generic error.
The typical cause for this error is an unexpected framework level problem.
Sourcepub const FeatureType: Self
pub const FeatureType: Self
Core ML throws/returns this error when the model client, typically an application, sends the wrong feature type to a model’s input.
The typical cause for this error is a programming mistake.
For example, a prediction method will throw/return the error when the caller passes an image
to a model’s input that expects an MLMultiArray
.
Sourcepub const IO: Self
pub const IO: Self
Core ML throws/returns this error when the framework encounters some I/O problem, most likely a file I/O problem.
For example, a model loading will throw/return the error when the caller requests a non-existing model URL.
Sourcepub const CustomLayer: Self
pub const CustomLayer: Self
Core ML throws/returns this error when the framework encounters an error in the custom layer subsystem.
The typical cause for this error is a programming mistake.
For example, a prediction method will throw/return the error when it fails to find the custom layer implementation.
Sourcepub const CustomModel: Self
pub const CustomModel: Self
Core ML throws/returns this error when the framework encounters an error in the custom model subsystem.
The typical cause for this error is a programming mistake.
For example, a prediction method will throw/return the error when it fails to find the custom model implementation.
Sourcepub const Update: Self
pub const Update: Self
Core ML throws/returns this error when the framework encounters an error while performing the on-device model update.
For example, the framework will throw/return the error when it fails to save the updated model.
Sourcepub const Parameters: Self
pub const Parameters: Self
Core ML throws/returns this error when the model client, typically an application, queries an unsupported model parameter (see MLParameterKey).
The typical cause for this error is a programming mistake.
Sourcepub const ModelDecryptionKeyFetch: Self
pub const ModelDecryptionKeyFetch: Self
Core ML throws/returns this error when the framework fails to download the model decryption key.
The typical cause for this error is a network connection issue to the key server.
Sourcepub const ModelDecryption: Self
pub const ModelDecryption: Self
Core ML throws/returns this error when the framework encounters an error in the model decryption subsystem.
The typical cause for this error is in the key server configuration and the client application cannot do much about it.
For example, a model loading method will throw/return the error when it uses incorrect model decryption key.
Sourcepub const ModelCollection: Self
pub const ModelCollection: Self
Core ML throws/returns this error when the framework encounters an error in the model collection deployment subsystem.
The typical cause for this error is the network connectability issue to the model deployment server.
Sourcepub const PredictionCancelled: Self
pub const PredictionCancelled: Self
Core ML throws/returns this error when the prediction is cancelled prior to completing.
Trait Implementations§
Source§impl Clone for MLModelError
impl Clone for MLModelError
Source§fn clone(&self) -> MLModelError
fn clone(&self) -> MLModelError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more