pub struct MockDeploymentTarget { /* private fields */ }Implementations§
Source§impl MockDeploymentTarget
impl MockDeploymentTarget
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new method can still be called
like <MockX as TraitY>::new
Source§impl MockDeploymentTarget
impl MockDeploymentTarget
Sourcepub fn expect_get(&mut self) -> &mut Expectation
pub fn expect_get(&mut self) -> &mut Expectation
Create an Expectation for mocking the get method
Sourcepub fn expect_update(&mut self) -> &mut Expectation
pub fn expect_update(&mut self) -> &mut Expectation
Create an Expectation for mocking the update method
Sourcepub fn expect_delete(&mut self) -> &mut Expectation
pub fn expect_delete(&mut self) -> &mut Expectation
Create an Expectation for mocking the delete method
Trait Implementations§
Source§impl Debug for MockDeploymentTarget
impl Debug for MockDeploymentTarget
Source§impl Default for MockDeploymentTarget
impl Default for MockDeploymentTarget
Source§impl DeploymentTarget for MockDeploymentTarget
impl DeploymentTarget for MockDeploymentTarget
Source§fn get<'life0, 'async_trait>(
&'life0 self,
components: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<Vec<ComponentSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
components: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<Vec<ComponentSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Retrieves the current status of components within a deployment.
§Arguments
components- The components whose current status should be retrieveddeployment_spec- The deployment context containing these components
§Returns
A vector of ComponentSpec representing the currently deployed state of the requested components.
§Errors
Returns an error if the current deployment status cannot be determined.
Source§fn update<'life0, 'async_trait>(
&'life0 self,
components_to_update: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
components_to_update: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Updates the specified components within a deployment.
§Arguments
components_to_update- The components to be updateddeployment_spec- The deployment context for these components
§Returns
A map where keys are component identifiers and values are ComponentResultSpec
indicating the outcome of each component’s update operation.
§Errors
Returns an error if the update operation cannot be performed. Individual component failures should be reported in the returned map rather than as an overall error.
Source§fn delete<'life0, 'async_trait>(
&'life0 self,
components_to_delete: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
components_to_delete: Vec<ComponentSpec>,
deployment_spec: DeploymentSpec,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, ComponentResultSpec>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Removes the specified components from a deployment.
§Arguments
components_to_delete- The components to be removeddeployment_spec- The deployment context for these components
§Returns
A map where keys are component identifiers and values are ComponentResultSpec
indicating the outcome of each component’s deletion operation.
§Errors
Returns an error if the delete operation cannot be performed. Individual component failures should be reported in the returned map rather than as an overall error.