lash-core 0.1.0-alpha.40

Sans-IO turn machine and runtime kernel for the lash agent runtime.
Documentation
use super::support::*;

#[derive(Clone, Debug)]
pub struct StaticModelPolicy {
    supported_variants: &'static [&'static str],
}

impl StaticModelPolicy {
    pub fn new() -> Self {
        Self {
            supported_variants: &[],
        }
    }

    pub fn with_variants(supported_variants: &'static [&'static str]) -> Self {
        Self { supported_variants }
    }
}

impl Default for StaticModelPolicy {
    fn default() -> Self {
        Self::new()
    }
}

impl ProviderModelPolicy for StaticModelPolicy {
    fn supported_variants(&self, _model: &str) -> &'static [&'static str] {
        self.supported_variants
    }
}