Skip to main content

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

Trait for async conversion from one type to another.

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>> + MaybeSend

Performs the conversion.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl AsyncTryFrom<AddUploadPartRequest> for Form

Available on crate feature upload-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<CreateSkillRequest> for Form

Available on crate feature skill-types only.
Source§

type Error = OpenAIError

Source§

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

Source§

impl AsyncTryFrom<CreateSkillVersionRequest> for Form

Available on crate feature skill-types only.
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<CreateVideoCharacterRequest> for Form

Available on crate feature video-types only.
Source§

impl AsyncTryFrom<CreateVideoEditRequest> for Form

Available on crate feature video-types only.
Source§

impl AsyncTryFrom<CreateVideoExtendRequest> for Form

Available on crate feature video-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>

Source§

impl AsyncTryFrom<CreateVoiceConsentRequest> for Form

Available on crate feature audio-types only.
Source§

impl AsyncTryFrom<CreateVoiceRequest> for Form

Available on crate feature audio-types only.
Source§

type Error = OpenAIError

Source§

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

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.

Implementors§