lash_core/provider/
model_policy.rs1use super::support::*;
2
3#[derive(Clone, Debug)]
4pub struct StaticModelPolicy {
5 supported_variants: &'static [&'static str],
6}
7
8impl StaticModelPolicy {
9 pub fn new() -> Self {
10 Self {
11 supported_variants: &[],
12 }
13 }
14
15 pub fn with_variants(supported_variants: &'static [&'static str]) -> Self {
16 Self { supported_variants }
17 }
18}
19
20impl Default for StaticModelPolicy {
21 fn default() -> Self {
22 Self::new()
23 }
24}
25
26impl ProviderModelPolicy for StaticModelPolicy {
27 fn supported_variants(&self, _model: &str) -> &'static [&'static str] {
28 self.supported_variants
29 }
30}