pub trait ConditionExt:
Resource
+ Clone
+ Debug
+ Send
+ Sync
+ 'staticwhere
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§
Sourcefn 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_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
Sourcefn 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,
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§
Sourcefn 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_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
Sourcefn 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,
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§
impl<T> ConditionExt for Twhere
T: Resource<Scope = NamespaceResourceScope> + Clone + Debug + Send + Sync + 'static + Serialize + DeserializeOwned,
T::DynamicType: Default,
Generic implementation for any resource with a status containing conditions