ConditionExt

Trait ConditionExt 

Source
pub trait ConditionExt:
    Resource
    + Clone
    + Debug
    + Send
    + Sync
    + 'static
where Self::DynamicType: Default,
{ // Required methods fn update_condition<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 Client, condition: Condition, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn update_conditions<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 Client, conditions: Vec<Condition>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn set_ready<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 Client, message: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn set_error<'life0, 'life1, 'life2, 'async_trait, E>( &'life0 self, client: &'life1 Client, error: &'life2 E, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where E: 'async_trait + StatusCondition + Send + Sync, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait { ... } }
Expand description

Extension trait for resources with status conditions

Required Methods§

Source

fn update_condition<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 Client, condition: Condition, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update a single condition on the resource’s status

Source

fn update_conditions<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 Client, conditions: Vec<Condition>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Update multiple conditions atomically

Provided Methods§

Source

fn set_ready<'life0, 'life1, 'async_trait>( &'life0 self, client: &'life1 Client, message: impl 'async_trait + Into<String> + Send, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set the Ready condition to true

Source

fn set_error<'life0, 'life1, 'life2, 'async_trait, E>( &'life0 self, client: &'life1 Client, error: &'life2 E, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where E: 'async_trait + StatusCondition + Send + Sync, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Set the Ready condition to false with error info

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<T> ConditionExt for T

Generic implementation for any resource with a status containing conditions