pub struct GatewayConfigSpec {
pub enabled: bool,
pub routes: Vec<GatewayRoute>,
pub default_provider: Option<ProviderId>,
pub allow_unlisted_models: bool,
pub auth_scheme: String,
pub inference_path_prefix: String,
}Fields§
§enabled: bool§routes: Vec<GatewayRoute>§default_provider: Option<ProviderId>Authorizes the synthetic catch-all route, but a model is only
dispatched to it when Self::allow_unlisted_models is also set; see
GatewayConfig::is_model_exposed.
allow_unlisted_models: boolClosed allowlist when false (the default): a model matching no route
and absent from the registry is denied (403) rather than silently
billed against default_provider. Set true only to let the default
provider absorb arbitrary model strings.
auth_scheme: String§inference_path_prefix: StringImplementations§
Source§impl GatewayConfigSpec
impl GatewayConfigSpec
pub fn resolve(self) -> GatewayConfig
Trait Implementations§
Source§impl Clone for GatewayConfigSpec
impl Clone for GatewayConfigSpec
Source§fn clone(&self) -> GatewayConfigSpec
fn clone(&self) -> GatewayConfigSpec
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 GatewayConfigSpec
impl Debug for GatewayConfigSpec
Source§impl Default for GatewayConfigSpec
impl Default for GatewayConfigSpec
Source§impl<'de> Deserialize<'de> for GatewayConfigSpec
impl<'de> Deserialize<'de> for GatewayConfigSpec
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 JsonSchema for GatewayConfigSpec
impl JsonSchema for GatewayConfigSpec
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for GatewayConfigSpec
impl RefUnwindSafe for GatewayConfigSpec
impl Send for GatewayConfigSpec
impl Sync for GatewayConfigSpec
impl Unpin for GatewayConfigSpec
impl UnsafeUnpin for GatewayConfigSpec
impl UnwindSafe for GatewayConfigSpec
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