Trait AsyncTryFrom

Source
pub trait AsyncTryFrom<T>: Sized {
    type Error;

    // Required method
    fn try_from(
        value: T,
    ) -> impl Future<Output = Result<Self, Self::Error>> + Send;
}

Required Associated Types§

Source

type Error

The type returned in the event of a conversion error.

Required Methods§

Source

fn try_from(value: T) -> impl Future<Output = Result<Self, Self::Error>> + Send

Performs the conversion.

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.

Implementations on Foreign Types§

Source§

impl AsyncTryFrom<AddUploadPartRequest> for Form

Source§

impl AsyncTryFrom<CreateFileRequest> for Form

Source§

type Error = OpenAIError

Source§

async fn try_from(request: CreateFileRequest) -> Result<Self, Self::Error>

Source§

impl AsyncTryFrom<CreateImageEditRequest> for Form

Source§

impl AsyncTryFrom<CreateImageVariationRequest> for Form

Source§

impl AsyncTryFrom<CreateTranscriptionRequest> for Form

Source§

impl AsyncTryFrom<CreateTranslationRequest> for Form

Implementors§