Where It All Started.

Where It All Started.

Life, Stock Trading, Investments, Business and Startup. Most are programming stuff.

Simple Rust Mutation Relationship Diagram

Rust mutation can be somewhat confusing if your a beginner. Its similar to C++ way of doing things on where to put the asterisk (*) and ampersand (&) sign in variable declaration. Moving the asterisk sign and ampersand sign makes the declaration sometimes more mutable and also can make it less mutable.

Here is a simple diagram on Rust mutation that I found on StackOverflow (SO). I can’t find the exact link to reference as this one is stored in my notes.


        a: &T == const T* const a;      // can't mutate either
    mut a: &T == const T* a;            // can't mutate what is pointed to
    a: &mut T == T* const a;            // can't mutate pointer
mut a: &mut T == T* a;                  // can mutate both

Popular Posts

  • Bitcoin (BTC) Still Bullish According To BlockTower
    The continuous Bitcoin volatility, according to BlockTower Capital’s general partner Michael Bucella, should not come as a surprise because it is part of the asset’s development trajectory. Bucella told CNBC […]
  • Major Firm BlackRock To Create It’s Own Blockchain ETF
    According to a filing with the US Securities and Exchange Commission on Jan. 21, BlackRock Inc., the world’s largest asset management business, has applied for an exchange-traded fund (ETF) that […]
  • Google Going Crypto
    As the firm looks to provide a wider range of financial services, including cryptocurrencies, Google has hired veteran PayPal CEO Arnold Goldberg to manage its payments division. Google’s action comes […]
  • Total Crypto Market Cap Will Reach 5 Trillion USD In 2022 According To AvaLabs CEO
    In 2022, John Wu, the CEO of Ava Labs, a blockchain business that creates the software for the Avalanche (AVAX) blockchain, offered a lot of fascinating forecasts for the cryptocurrency […]
  • Pavia Metaverse Project Debuts On Cardano (ADA)
    The Metaverse is currently in its early stages. While Ethereum-based metaverse games like The Sandbox have exploded in popularity, investors are also interested in developing applications on secure PoS networks […]

Leave a Reply

Your email address will not be published. Required fields are marked *