pub unsafe trait MLCustomModel {
// Provided methods
unsafe fn initWithModelDescription_parameterDictionary_error(
this: Allocated<Self>,
model_description: &MLModelDescription,
parameters: &NSDictionary<NSString, AnyObject>,
) -> Result<Retained<Self>, Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn predictionFromFeatures_options_error(
&self,
input: &ProtocolObject<dyn MLFeatureProvider>,
options: &MLPredictionOptions,
) -> Result<Retained<ProtocolObject<dyn MLFeatureProvider>>, Retained<NSError>>
where Self: Sized + Message { ... }
unsafe fn predictionsFromBatch_options_error(
&self,
input_batch: &ProtocolObject<dyn MLBatchProvider>,
options: &MLPredictionOptions,
) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>
where Self: Sized + Message { ... }
}Available on crate feature
MLCustomModel only.Expand description
Provided Methods§
Sourceunsafe fn initWithModelDescription_parameterDictionary_error(
this: Allocated<Self>,
model_description: &MLModelDescription,
parameters: &NSDictionary<NSString, AnyObject>,
) -> Result<Retained<Self>, Retained<NSError>>
Available on crate feature MLModelDescription only.
unsafe fn initWithModelDescription_parameterDictionary_error( this: Allocated<Self>, model_description: &MLModelDescription, parameters: &NSDictionary<NSString, AnyObject>, ) -> Result<Retained<Self>, Retained<NSError>>
MLModelDescription only.§Safety
parameters generic should be of the correct type.
unsafe fn predictionFromFeatures_options_error( &self, input: &ProtocolObject<dyn MLFeatureProvider>, options: &MLPredictionOptions, ) -> Result<Retained<ProtocolObject<dyn MLFeatureProvider>>, Retained<NSError>>
Available on crate features
MLFeatureProvider and MLPredictionOptions only.Sourceunsafe fn predictionsFromBatch_options_error(
&self,
input_batch: &ProtocolObject<dyn MLBatchProvider>,
options: &MLPredictionOptions,
) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>
Available on crate features MLBatchProvider and MLPredictionOptions only.
unsafe fn predictionsFromBatch_options_error( &self, input_batch: &ProtocolObject<dyn MLBatchProvider>, options: &MLPredictionOptions, ) -> Result<Retained<ProtocolObject<dyn MLBatchProvider>>, Retained<NSError>>
MLBatchProvider and MLPredictionOptions only.Batch prediction with explicit options, if not implemented the single input predictionFromFeatures:options:error will be used
Trait Implementations§
impl<T> ImplementedBy<T> for dyn MLCustomModel
Source§impl ProtocolType for dyn MLCustomModel
impl ProtocolType for dyn MLCustomModel
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".