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§
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
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.