Create

Trait Create 

Source
pub trait Create: Sync + Send {
    // Required methods
    fn create_config_item_gateway(
        &self,
        gateway_name: &str,
        gateway: SgGateway,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send;
    fn create_config_item_route(
        &self,
        gateway_name: &str,
        route_name: &str,
        route: SgHttpRoute,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send;
    fn create_plugin(
        &self,
        id: &PluginInstanceId,
        value: Value,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send;

    // Provided methods
    fn create_config_item(
        &self,
        name: &str,
        item: ConfigItem,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send { ... }
    fn create_config(
        &self,
        config: Config,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send { ... }
}

Required Methods§

Source

fn create_config_item_gateway( &self, gateway_name: &str, gateway: SgGateway, ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send

Source

fn create_config_item_route( &self, gateway_name: &str, route_name: &str, route: SgHttpRoute, ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send

Source

fn create_plugin( &self, id: &PluginInstanceId, value: Value, ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send

Provided Methods§

Source

fn create_config_item( &self, name: &str, item: ConfigItem, ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send

Source

fn create_config( &self, config: Config, ) -> impl Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Create for K8s

Source§

impl<F> Create for Fs<F>
where F: ConfigFormat + Send + Sync,

Source§

impl<F> Create for Redis<F>
where F: ConfigFormat + Send + Sync,