Update

Trait Update 

Source
pub trait Update<TUpdate, TResponse>
where TUpdate: Serialize + Sync + Send, TResponse: Serialize + DeserializeOwned, Self: WithApiClient + WithBasePath + Sync,
{ // Provided methods fn update( &self, updates: &[TUpdate], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send { ... } fn update_from<'a, T>( &self, updates: &'a [T], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send where T: Sync + Clone + 'a, TUpdate: From<T> { ... } fn update_ignore_unknown_ids( &self, updates: &[TUpdate], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send where TUpdate: EqIdentity, TResponse: Send { ... } fn update_from_ignore_unknown_ids<'a, T>( &self, updates: &'a [T], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send where T: Sync + Clone + 'a, TUpdate: From<T> + EqIdentity, TResponse: Send { ... } }
Expand description

Trait for resource types that can be patch updated.

Provided Methods§

Source

fn update( &self, updates: &[TUpdate], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send

Update a list of resources.

§Arguments
  • updates - Items to update.
Source

fn update_from<'a, T>( &self, updates: &'a [T], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
where T: Sync + Clone + 'a, TUpdate: From<T>,

Update a list of resources by converting to the update from a different type.

§Arguments
  • updates - Items to update.
Source

fn update_ignore_unknown_ids( &self, updates: &[TUpdate], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
where TUpdate: EqIdentity, TResponse: Send,

Update a list of resources, ignoring any that fail due to items missing in CDF.

§Arguments
  • updates - Items to update.
Source

fn update_from_ignore_unknown_ids<'a, T>( &self, updates: &'a [T], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
where T: Sync + Clone + 'a, TUpdate: From<T> + EqIdentity, TResponse: Send,

Update a list of resources by converting from a different type, ignoring any that fail due items missing in CDF.

§Arguments
  • updates - Items to update.

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§