pub struct ModelPoolSpec {
pub id: String,
pub members: Vec<PoolMemberSpec>,
pub routing: PoolRoutingPolicy,
pub switch: PoolSwitchPolicy,
}Expand description
A named pool of member models, addressable like a single model.
Fields§
§id: StringStable id, unique across the combined model + pool id namespace.
members: Vec<PoolMemberSpec>Ordered set of member models. Must be non-empty.
routing: PoolRoutingPolicyHome-selection and stickiness policy.
switch: PoolSwitchPolicyWhen the pool abandons the active member for another.
Implementations§
Source§impl ModelPoolSpec
impl ModelPoolSpec
Sourcepub fn new<I, S>(id: impl Into<String>, member_model_ids: I) -> ModelPoolSpec
pub fn new<I, S>(id: impl Into<String>, member_model_ids: I) -> ModelPoolSpec
Convenience constructor for tests and bootstrap code. Routing and
switch policies default; members are taken as Member-role with no
explicit weight.
Trait Implementations§
Source§impl Clone for ModelPoolSpec
impl Clone for ModelPoolSpec
Source§fn clone(&self) -> ModelPoolSpec
fn clone(&self) -> ModelPoolSpec
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 ConfigRecordMerge for ModelPoolSpec
impl ConfigRecordMerge for ModelPoolSpec
type Patch = NoConfigPatch
fn merge_patch( self, _patch: NoConfigPatch, ) -> Result<ModelPoolSpec, ConfigRecordError>
Source§impl Debug for ModelPoolSpec
impl Debug for ModelPoolSpec
Source§impl<'de> Deserialize<'de> for ModelPoolSpec
impl<'de> Deserialize<'de> for ModelPoolSpec
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelPoolSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ModelPoolSpec, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for ModelPoolSpec
impl JsonSchema for ModelPoolSpec
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 moreSource§impl PartialEq for ModelPoolSpec
impl PartialEq for ModelPoolSpec
Source§fn eq(&self, other: &ModelPoolSpec) -> bool
fn eq(&self, other: &ModelPoolSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for ModelPoolSpec
impl Serialize for ModelPoolSpec
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ModelPoolSpec
Auto Trait Implementations§
impl Freeze for ModelPoolSpec
impl RefUnwindSafe for ModelPoolSpec
impl Send for ModelPoolSpec
impl Sync for ModelPoolSpec
impl Unpin for ModelPoolSpec
impl UnsafeUnpin for ModelPoolSpec
impl UnwindSafe for ModelPoolSpec
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