Skip to main content

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 + Sync + Send>>> + Send;
    fn create_config_item_route(
        &self,
        gateway_name: &str,
        route_name: &str,
        route: SgHttpRoute,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send;
    fn create_plugin(
        &self,
        id: &PluginInstanceId,
        value: Value,
    ) -> impl Future<Output = Result<(), Box<dyn Error + Sync + Send>>> + Send;

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

Required Methods§

Source

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

Source

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

Source

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

Provided Methods§

Source

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

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

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,