pub enum ModelAvailability {
Available,
DeviceNotEligible,
AppleIntelligenceNotEnabled,
ModelNotReady,
Unknown,
}Expand description
Represents the availability status of a FoundationModel.
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).
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
Source§fn clone(&self) -> ModelAvailability
fn clone(&self) -> ModelAvailability
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModelAvailability
impl Debug for ModelAvailability
Source§impl PartialEq for ModelAvailability
impl PartialEq for ModelAvailability
impl Copy for ModelAvailability
impl Eq 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 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