pub trait Handler<Ctx> {
// Required methods
fn deploy_model(
&self,
cx: Ctx,
model_name: String,
version: Option<String>,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<String, String>>> + Send;
fn undeploy_model(
&self,
cx: Ctx,
model_name: String,
lattice: Option<String>,
non_destructive: bool,
) -> impl Future<Output = Result<Result<(), String>>> + Send;
fn put_model(
&self,
cx: Ctx,
model: String,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<(String, String), String>>> + Send;
fn put_manifest(
&self,
cx: Ctx,
manifest: OamManifest,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<(String, String), String>>> + Send;
fn get_model_history(
&self,
cx: Ctx,
model_name: String,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<Vec<VersionInfo>, String>>> + Send;
fn get_model_status(
&self,
cx: Ctx,
model_name: String,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<Status, String>>> + Send;
fn get_model_details(
&self,
cx: Ctx,
model_name: String,
version: Option<String>,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<OamManifest, String>>> + Send;
fn delete_model_version(
&self,
cx: Ctx,
model_name: String,
version: Option<String>,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<bool, String>>> + Send;
fn get_models(
&self,
cx: Ctx,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<Vec<ModelSummary>, String>>> + Send;
}
Required Methods§
Sourcefn deploy_model(
&self,
cx: Ctx,
model_name: String,
version: Option<String>,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<String, String>>> + Send
fn deploy_model( &self, cx: Ctx, model_name: String, version: Option<String>, lattice: Option<String>, ) -> impl Future<Output = Result<Result<String, String>>> + Send
Deploys a model to the WADM system. If no lattice is provided, the default lattice name ‘default’ is used.
Sourcefn undeploy_model(
&self,
cx: Ctx,
model_name: String,
lattice: Option<String>,
non_destructive: bool,
) -> impl Future<Output = Result<Result<(), String>>> + Send
fn undeploy_model( &self, cx: Ctx, model_name: String, lattice: Option<String>, non_destructive: bool, ) -> impl Future<Output = Result<Result<(), String>>> + Send
Undeploys a model from the WADM system.
Sourcefn put_model(
&self,
cx: Ctx,
model: String,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<(String, String), String>>> + Send
fn put_model( &self, cx: Ctx, model: String, lattice: Option<String>, ) -> impl Future<Output = Result<Result<(String, String), String>>> + Send
Stores the application manifest for later deploys. Model is the full YAML or JSON string in this case Returns the model name and version respectively.
Sourcefn put_manifest(
&self,
cx: Ctx,
manifest: OamManifest,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<(String, String), String>>> + Send
fn put_manifest( &self, cx: Ctx, manifest: OamManifest, lattice: Option<String>, ) -> impl Future<Output = Result<Result<(String, String), String>>> + Send
Store an oam manifest directly for later deploys.
Sourcefn get_model_history(
&self,
cx: Ctx,
model_name: String,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<Vec<VersionInfo>, String>>> + Send
fn get_model_history( &self, cx: Ctx, model_name: String, lattice: Option<String>, ) -> impl Future<Output = Result<Result<Vec<VersionInfo>, String>>> + Send
Retrieves the history of a given model name.
Sourcefn get_model_status(
&self,
cx: Ctx,
model_name: String,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<Status, String>>> + Send
fn get_model_status( &self, cx: Ctx, model_name: String, lattice: Option<String>, ) -> impl Future<Output = Result<Result<Status, String>>> + Send
Retrieves the status of a given model by name.
Sourcefn get_model_details(
&self,
cx: Ctx,
model_name: String,
version: Option<String>,
lattice: Option<String>,
) -> impl Future<Output = Result<Result<OamManifest, String>>> + Send
fn get_model_details( &self, cx: Ctx, model_name: String, version: Option<String>, lattice: Option<String>, ) -> impl Future<Output = Result<Result<OamManifest, String>>> + Send
Retrieves details on a given model.
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.