Rust – il linguaggio – 52

sg3
Continuo, oggi qui: /usr/local/share/doc/rust/html/book/borrow-and-asref.html.
Solo qualche appunto; in generale sono cose già viste e queste specifiche servono solo se davvero si userà Rust.

Borrow e AsRef

The Borrow and AsRef traits are very similar, but different.
The Borrow trait is used when you’re writing a datastructure, and you want to use either an owned or borrowed type as synonymous for some purpose.

The AsRef trait is a conversion trait. It’s used for converting some value to a reference in generic code.

OK, passo al capitolo successivo, a proposito dei canali qui: /usr/local/share/doc/rust/html/book/release-channels.html.

Release Channels

The Rust project uses a concept called ‘release channels’ to manage releases. It’s important to understand this process to choose which version of Rust your project should use.

There are three channels for Rust releases:

  • Nightly
  • Beta
  • Stable

New nightly releases are created once a day. Every six weeks, the latest nightly release is promoted to ‘Beta’. At that point, it will only receive patches to fix serious errors. Six weeks later, the beta is promoted to ‘Stable’, and becomes the next release of 1.x.

This process happens in parallel. So every six weeks, on the same day, nightly goes to beta, beta goes to stable. When 1.x is released, at the same time, 1.(x + 1)-beta is released, and the nightly becomes the first version of 1.(x + 2)-nightly.

Generally speaking, unless you have a specific reason, you should be using the stable release channel. These releases are intended for a general audience.

Poi, ovviamente, ci sono casi che … –da leggere tutto di là 😀

Come pure il capitolo successivo, qui: /usr/local/share/doc/rust/html/book/using-rust-without-the-standard-library.html.

Usare Rust senza la Standard Library

Rust’s standard library provides a lot of useful functionality, but assumes support for various features of its host system: threads, networking, heap allocation, and others. There are systems that do not have these features, however, and Rust can work with those too! To do so, we tell Rust that we don’t want to use the standard library via an attribute: #![no_std].

Ahemmm… ovviamente (etc.) 😉

:mrgreen:

Posta un commento o usa questo indirizzo per il trackback.

Trackback

  • Rust – il linguaggio – 53 | Ok, panico su 23 aprile 2016 alle 08:37

    […] Proseguendo dovrei scrivere del capitolo Nightly Rust, qui: /usr/local/share/doc/rust/html/book/nightly-rust.html ma per me sono cose troppo specifiche. Lo stesso vale per tutti i post del capitolo; Tutto per über-nerd rustici (rustaceans). Che un po’ invidio ma non sono dei loro. […]

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.

%d blogger hanno fatto clic su Mi Piace per questo: