trait_AsyncFnOnce

trait_AsyncFnOnce (async 일회 호출 트레이트)

FnOnce 트레이트의 async 인식 버전이에요. 모든 async fn과 future를 반환하는 함수가 이 트레이트를 구현해요.

출처: Rust 공식 문서

본문

AsyncFnOnceFnOnce의 async 인식 버전이에요. 모든 async fn과 future를 반환하는 함수가 이 트레이트를 구현해요.

pub trait AsyncFnOnce<Args>
{
    type Output;
    type CallOnceFuture: Future<Output = Self::Output>;

    // 필수 메서드
    fn call_once(self, args: Args) -> Self::CallOnceFuture;
}

더 알아보기 (Learn more)

Rust 공식 문서