Open in app

Sign In

Write

Sign In

Mcjxy
Mcjxy

Home

About

Jun 10, 2021

How nice a day

too many cloud now.

1 min read

1 min read


Jun 9, 2021

Function-like procedural macros

Function-like procedural macros are procedural macros that are invoked using the macro invocation operator (!). These macros are defined by a public function with the proc_macro attribute and a signature of (TokenStream) -> TokenStream. The input TokenStream is what is inside the delimiters of the macro invocation and the output TokenStream replaces the entire macro invocation. For example, the following macro definition ignores its input and outputs a function answer into its scope.

1 min read

1 min read


Jun 9, 2021

Derive macro helper attributes

Derive macros define new inputs for the derive attribute. These macros can create new items given the token stream of a struct, enum, or union. They can also define derive macro helper attributes. Custom derive macros are defined by a public function with the proc_macro_derive attribute and a signature of (TokenStream) -> TokenStream. The input TokenStream is the token stream of the item that has the derive attribute on it. The output TokenStream must be a set of items that are then appended to the module or block that the item from the input TokenStream is in.

1 min read

1 min read


Jun 9, 2021

Pong Pong Pong

Pang Pang Pang

1 min read

1 min read


May 25, 2021

What Is Ownership

Rust’s central feature is ownership. Although the feature is straightforward to explain, it has deep implications for the rest of the language. All programs have to manage the way they use a computer’s memory while running. Some languages have garbage collection that constantly looks for no longer used memory as…

8 min read

8 min read


May 25, 2021

Data Types

Every value in Rust is of a certain data type, which tells Rust what kind of data is being specified so it knows how to work with that data. We’ll look at two data type subsets: scalar and compound. Keep in mind that Rust is a statically typed language, which…

5 min read

5 min read


May 25, 2021

The Rust Programming Language

by Steve Klabnik and Carol Nichols, with contributions from the Rust Community This version of the text assumes you’re using Rust 1.50 or later with edition="2018" in Cargo.toml of all projects to use Rust 2018 Edition idioms. …

2 min read

2 min read


May 21, 2021

MY day is today

today is my day!

1 min read

1 min read


May 21, 2021

What is mem

Basic functions for dealing with memory.

1 min read

1 min read


May 21, 2021

Bing Bing Bing

start from here

1 min read

1 min read

Mcjxy

Mcjxy

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Text to speech

Teams