split-async 0.1.0

A procedural macro to generate sync and async versions of a function
Documentation

split-async

Why bother writing similar code twice for blocking and async code?

MIT licensed

This is a modified version of the maybe-async crate by Guoli Lyu.

When implementing both sync and async versions of a function, the implementations tend to be very similar, with the exception of the async and .await keywords.

This crate allows you to write just the async implementation of your function, a blocking version is then generated automatically.

Features:

  • Split your function into a blocking and an async version
  • Within your function, use other split functions by choosing which version to use