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-up138arrow-down10cross-posted to: [email protected][email protected][email protected]
arrow-up138arrow-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: [email protected][email protected][email protected]
minus-squarepm_me_your_quackers@lemmy.worldlinkfedilinkarrow-up4arrow-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.