AsyncFnMut

AsyncFnMut (async 가변 호출 트레이트)

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

출처: Rust 공식 문서

본문

AsyncFnMutFnMut의 async 인식 버전이에요. 모든 async fn과 future를 반환하는 함수가 이 트레이트를 구현해요. 캡처된 변수에 대한 가변 참조를 취하는 async 클로저에 의해 자동으로 구현돼요.

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

    // 필수 메서드
    fn call_mut(&mut self, args: Args) -> Self::CallMutFuture;
}

더 알아보기 (Learn more)

Rust 공식 문서