pub struct ProviderPreferences {Show 14 fields
pub allow_fallbacks: Option<bool>,
pub data_collection: Option<DataCollection>,
pub enforce_distillable_text: Option<bool>,
pub ignore: Option<Vec<String>>,
pub max_price: Option<ProviderPriceLimit>,
pub only: Option<Vec<String>>,
pub order: Option<Vec<String>>,
pub preferred_max_latency: Option<f64>,
pub preferred_min_throughput: Option<f64>,
pub quantizations: Option<Vec<String>>,
pub require_parameters: Option<bool>,
pub sort: Option<Value>,
pub zdr: Option<bool>,
pub extra: JsonObject,
}Fields§
§allow_fallbacks: Option<bool>§data_collection: Option<DataCollection>§enforce_distillable_text: Option<bool>§ignore: Option<Vec<String>>§max_price: Option<ProviderPriceLimit>§only: Option<Vec<String>>§order: Option<Vec<String>>§preferred_max_latency: Option<f64>§preferred_min_throughput: Option<f64>§quantizations: Option<Vec<String>>§require_parameters: Option<bool>§sort: Option<Value>§zdr: Option<bool>§extra: JsonObjectImplementations§
Source§impl ProviderPreferences
impl ProviderPreferences
pub fn new() -> Self
pub fn require_parameters(self, value: bool) -> Self
pub fn only( self, providers: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn order( self, providers: impl IntoIterator<Item = impl Into<String>>, ) -> Self
pub fn with_field(self, key: impl Into<String>, value: impl Into<Value>) -> Self
Trait Implementations§
Source§impl Clone for ProviderPreferences
impl Clone for ProviderPreferences
Source§fn clone(&self) -> ProviderPreferences
fn clone(&self) -> ProviderPreferences
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ProviderPreferences
impl Debug for ProviderPreferences
Source§impl Default for ProviderPreferences
impl Default for ProviderPreferences
Source§fn default() -> ProviderPreferences
fn default() -> ProviderPreferences
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProviderPreferences
impl<'de> Deserialize<'de> for ProviderPreferences
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
Source§impl PartialEq for ProviderPreferences
impl PartialEq for ProviderPreferences
Source§fn eq(&self, other: &ProviderPreferences) -> bool
fn eq(&self, other: &ProviderPreferences) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ProviderPreferences
impl Serialize for ProviderPreferences
impl StructuralPartialEq for ProviderPreferences
Auto Trait Implementations§
impl Freeze for ProviderPreferences
impl RefUnwindSafe for ProviderPreferences
impl Send for ProviderPreferences
impl Sync for ProviderPreferences
impl Unpin for ProviderPreferences
impl UnsafeUnpin for ProviderPreferences
impl UnwindSafe for ProviderPreferences
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