#[non_exhaustive]pub enum Ecosystem {
Ollama,
Lmstudio,
HfCache,
Jan,
Gpt4all,
Custom,
Shelf,
}Expand description
Which ecosystem a model file location belongs to.
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.
Ollama
Ollama’s content-addressed blob store (~/.ollama/models).
Lmstudio
LM Studio’s publisher/repo/file.gguf tree.
HfCache
The Hugging Face hub cache (~/.cache/huggingface/hub).
Jan
Jan’s data folder.
Gpt4all
GPT4All’s models directory.
Custom
A user-configured custom directory.
Shelf
The modelshelf shared store itself.
Implementations§
Source§impl Ecosystem
impl Ecosystem
Sourcepub fn is_writable(&self) -> bool
pub fn is_writable(&self) -> bool
Whether modelshelf is allowed to modify files inside this ecosystem.
Ollama and the HF cache manage their own internal structure; we adopt files from them (hardlink into the store) but never rewrite anything inside them. This is a safety rule of the convention, not a heuristic.
Trait Implementations§
impl Copy for Ecosystem
Source§impl<'de> Deserialize<'de> for Ecosystem
impl<'de> Deserialize<'de> for Ecosystem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Ecosystem
impl StructuralPartialEq for Ecosystem
Auto Trait Implementations§
impl Freeze for Ecosystem
impl RefUnwindSafe for Ecosystem
impl Send for Ecosystem
impl Sync for Ecosystem
impl Unpin for Ecosystem
impl UnsafeUnpin for Ecosystem
impl UnwindSafe for Ecosystem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.