AsyncTryFrom

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;
}
Available on crate feature _api only.

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<CreateTranscriptionRequest> for Form

Available on crate feature audio-types only.
Source§

impl AsyncTryFrom<CreateTranslationRequest> for Form

Available on crate feature audio-types only.
Source§

impl AsyncTryFrom<CreateContainerFileRequest> for Form

Available on crate feature container-types only.
Source§

impl AsyncTryFrom<CreateFileRequest> for Form

Available on crate feature file-types only.
Source§

type Error = OpenAIError

Source§

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

Source§

impl AsyncTryFrom<CreateImageEditRequest> for Form

Available on crate feature image-types only.
Source§

impl AsyncTryFrom<CreateImageVariationRequest> for Form

Available on crate feature image-types only.
Source§

impl AsyncTryFrom<RealtimeCallCreateRequest> for Form

Available on crate feature realtime-types only.
Source§

type Error = OpenAIError

Available on crate feature _api only.
Source§

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

Available on crate feature _api only.
Source§

impl AsyncTryFrom<AddUploadPartRequest> for Form

Available on crate feature upload-types only.
Source§

impl AsyncTryFrom<CreateVideoRequest> for Form

Available on crate feature video-types only.
Source§

type Error = OpenAIError

Source§

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

Implementors§