#[non_exhaustive]pub enum ModelAvailability {
Available,
DeviceNotEligible,
AppleIntelligenceNotEnabled,
ModelNotReady,
PrivateCloudComputeSystemNotReady,
Unknown,
}Expand description
Represents the availability status of a FoundationModel.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Available
Model is available and ready to use.
DeviceNotEligible
Device is not eligible for Apple Intelligence.
AppleIntelligenceNotEnabled
Apple Intelligence is not enabled in system settings.
ModelNotReady
Model is not ready (downloading or other system reasons).
PrivateCloudComputeSystemNotReady
Private Cloud Compute isn’t ready to serve requests.
Unknown
Unavailability for an unknown reason.
Implementations§
Source§impl ModelAvailability
impl ModelAvailability
Sourcepub fn into_error(self) -> Option<Error>
pub fn into_error(self) -> Option<Error>
Returns an error describing why the model is unavailable.
Trait Implementations§
Source§impl Clone for ModelAvailability
impl Clone for ModelAvailability
impl Copy for ModelAvailability
Source§impl Debug for ModelAvailability
impl Debug for ModelAvailability
impl Eq for ModelAvailability
Source§impl PartialEq for ModelAvailability
impl PartialEq for ModelAvailability
impl StructuralPartialEq for ModelAvailability
Auto Trait Implementations§
impl Freeze for ModelAvailability
impl RefUnwindSafe for ModelAvailability
impl Send for ModelAvailability
impl Sync for ModelAvailability
impl Unpin for ModelAvailability
impl UnsafeUnpin for ModelAvailability
impl UnwindSafe for ModelAvailability
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more