async_fn

    0

    3

    lucycodes42

    Rust snippets

    The code defines an anonymous function that prints "Ok" and returns a future that will resolve with the value 1.

    Shortcut: async

    async fn name() -> std::io::Result<i32, futures::future::err> {
      Ok(1)
    }
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    Legal
    • Security
    • Privacy Policy
    • Code Privacy
    • Terms of Service
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.