#[non_exhaustive]pub enum Provider {
OpenRouter,
TypeSafe,
}Expand description
The hosted service that receives requests and authenticates the API key.
OpenRouter supports both API surfaces. TypeSafe always uses System One,
including when a configuration leaves the surface at its default.
§Examples
use jev::Provider;
assert_eq!(Provider::default(), Provider::OpenRouter);
assert_eq!("typesafe".parse::<Provider>()?, Provider::TypeSafe);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.
OpenRouter
OpenRouter, authenticated with an OpenRouter API key.
TypeSafe
TypeSafe AI’s direct API, authenticated with a TypeSafe API key.
Trait Implementations§
impl Copy for Provider
Source§impl<'de> Deserialize<'de> for Provider
impl<'de> Deserialize<'de> for Provider
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 Provider
Source§impl FromStr for Provider
impl FromStr for Provider
Source§fn from_str(value: &str) -> Result<Self, Self::Err>
fn from_str(value: &str) -> Result<Self, Self::Err>
Parses a provider name used by JEV_PROVIDER or configuration.
§Errors
Returns Error::Invalid for an unknown provider name.
§Examples
use jev::Provider;
assert_eq!("openrouter".parse::<Provider>()?, Provider::OpenRouter);
assert_eq!("typesafeai".parse::<Provider>()?, Provider::TypeSafe);impl StructuralPartialEq for Provider
Auto Trait Implementations§
impl Freeze for Provider
impl RefUnwindSafe for Provider
impl Send for Provider
impl Sync for Provider
impl Unpin for Provider
impl UnsafeUnpin for Provider
impl UnwindSafe for Provider
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.