Skip to content

Commit

Permalink
type alias
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Jun 25, 2024
1 parent c59d315 commit e89b51f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/transport/async_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,12 @@ impl<In: RpcMessage, Out: RpcMessage> Future for OpenBiFuture<In, Out> {
}
}

type AcceptBiFutureBox<In, Out> =
Pin<Box<dyn Future<Output = Option<(SendSink<In>, RecvStream<Out>)>> + Send + 'static>>;

/// Future returned by [MpscServerEndpoint::accept_bi]
pub struct AcceptBiFuture<In: RpcMessage, Out: RpcMessage> {
wrapped:
Pin<Box<dyn Future<Output = Option<(SendSink<Out>, RecvStream<In>)>> + Send + 'static>>,
wrapped: AcceptBiFutureBox<Out, In>,
_p: PhantomData<(In, Out)>,
}

Expand Down

0 comments on commit e89b51f

Please sign in to comment.