trait_AsyncFn
trait_AsyncFn (async 호출 트레이트)
Fn 트레이트의 async 인식 버전이에요. 모든 async fn과 future를 반환하는 함수가 이 트레이트를 구현해요.
출처: Rust 공식 문서
본문
AsyncFn은 Fn의 async 인식 버전이에요. 모든 async fn과 future를 반환하는 함수가 이 트레이트를 구현해요.
pub trait AsyncFn<Args>: AsyncFnMut<Args>
{
type Output;
type CallFuture: Future<Output = Self::Output>;
// 필수 메서드
fn call(&self, args: Args) -> Self::CallFuture;
}