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>>> + Send { ... }
fn create_from(
&self,
creates: &[impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + Send { ... }
fn create_ignore_duplicates(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
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>>> + Send
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>>> + Send
fn create( &self, creates: &[TCreate], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
Sourcefn create_from(
&self,
creates: &[impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + Send
fn create_from( &self, creates: &[impl Into<TCreate> + Sync + Clone], ) -> impl Future<Output = Result<Vec<TResponse>>> + Send
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>>> + Sendwhere
TCreate: EqIdentity,
fn create_ignore_duplicates(
&self,
creates: &[TCreate],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
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>>> + Sendwhere
TCreate: EqIdentity,
fn create_from_ignore_duplicates<'a, T: 'a>(
&self,
creates: &'a [impl Into<TCreate> + Sync + Clone],
) -> impl Future<Output = Result<Vec<TResponse>>> + Sendwhere
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", so this trait is not object safe.