pub trait Create<TCreate, TResponse>where
TCreate: Serialize + Sync + Send,
TResponse: Serialize + DeserializeOwned + Send,
Self: WithApiClient + WithBasePath + Sync,{
// Provided methods
fn create(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend { ... }
fn create_from(
&self,
creates: &[impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend { ... }
fn create_ignore_duplicates(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend
where TCreate: EqIdentity { ... }
fn create_from_ignore_duplicates<'a, T: 'a>(
&self,
creates: &'a [impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend
where TCreate: EqIdentity { ... }
}Expand description
Trait for creating resources with POST / requests.
Provided Methods§
Sourcefn create(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend
fn create( &self, creates: &[TCreate], ) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend
Sourcefn create_from(
&self,
creates: &[impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend
fn create_from( &self, creates: &[impl Into<TCreate> + Sync + Clone], ) -> impl Future<Output = Result<Vec<TResponse>>> + CondSend
Create a list of resources, converting from a different type.
§Arguments
creates- List of resources to create.
Sourcefn create_ignore_duplicates(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSendwhere
TCreate: EqIdentity,
fn create_ignore_duplicates(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSendwhere
TCreate: EqIdentity,
Create a list of resources, ignoring any that fail with general “conflict” errors.
§Arguments
creates- List of resources to create.
Sourcefn create_from_ignore_duplicates<'a, T: 'a>(
&self,
creates: &'a [impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSendwhere
TCreate: EqIdentity,
fn create_from_ignore_duplicates<'a, T: 'a>(
&self,
creates: &'a [impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + CondSendwhere
TCreate: EqIdentity,
Create a list of resources, converting from a different type, and ignoring any that fail with general “conflict” errors.
§Arguments
creates- List of resources to create.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".