#[non_exhaustive]pub enum LocalChoice {
Catalog(String),
File(PathBuf),
Model(Arc<dyn LocalModel>),
}Expand description
Where an on-device model comes from: a row id of the built-in local
catalog (&str), a GGUF file (PathBuf), or a loaded model
(Arc<dyn LocalModel>). Converts with From; read at build.
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.
Trait Implementations§
Source§impl Clone for LocalChoice
impl Clone for LocalChoice
Source§impl Debug for LocalChoice
impl Debug for LocalChoice
Source§impl From<&Path> for LocalChoice
impl From<&Path> for LocalChoice
Source§impl From<&str> for LocalChoice
impl From<&str> for LocalChoice
Source§impl From<Arc<dyn LocalModel>> for LocalChoice
impl From<Arc<dyn LocalModel>> for LocalChoice
Source§fn from(model: Arc<dyn LocalModel>) -> Self
fn from(model: Arc<dyn LocalModel>) -> Self
Converts to this type from the input type.
Source§impl From<PathBuf> for LocalChoice
impl From<PathBuf> for LocalChoice
Auto Trait Implementations§
impl !RefUnwindSafe for LocalChoice
impl !UnwindSafe for LocalChoice
impl Forget for LocalChoice
impl Freeze for LocalChoicewhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
*const ArcInner<dyn LocalModel> is !null: Freeze,
PhantomData<ArcInner<dyn LocalModel>>: Freeze,
impl Move for LocalChoice
impl Send for LocalChoice
impl Sync for LocalChoice
impl Unpin for LocalChoice
impl UnsafeUnpin for LocalChoicewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
*const ArcInner<dyn LocalModel> is !null: UnsafeUnpin,
PhantomData<ArcInner<dyn LocalModel>>: UnsafeUnpin,
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