Sibbo@sopuli.xyz to Rust Programming@lemmy.ml · 11 months agoAnnouncing async fn and return-position impl Trait in traitsblog.rust-lang.orgexternal-linkmessage-square2fedilinkarrow-up140arrow-down10cross-posted to: rust@lemmit.onlinehackernews@lemmy.smeargle.fanshackernews@derp.foorust@programming.dev
arrow-up140arrow-down1external-linkAnnouncing async fn and return-position impl Trait in traitsblog.rust-lang.orgSibbo@sopuli.xyz to Rust Programming@lemmy.ml · 11 months agomessage-square2fedilinkcross-posted to: rust@lemmit.onlinehackernews@lemmy.smeargle.fanshackernews@derp.foorust@programming.dev
minus-squarepm_me_your_quackers@lemmy.worldlinkfedilinkarrow-up5arrow-down1·edit-211 months agotrait HttpService { async fn fetch(&self, url: Url) -> HtmlBody; // ^^^^^^^^ desugars to: // fn fetch(&self, url: Url) -> impl Future; } Man I’ve been waiting for this to be stabilized for a long time. So excited about it.
trait HttpService { async fn fetch(&self, url: Url) -> HtmlBody; // ^^^^^^^^ desugars to: // fn fetch(&self, url: Url) -> impl Future; }
Man I’ve been waiting for this to be stabilized for a long time. So excited about it.