Comprehensive Rust(Ukrainian) 202412271 XI Залізо: Ранок 272 48 Ласкаво просимо до Rust на голому залізі 273 49 no_std 275 49.1 Мінімальна програма no_std . . . . . . . . . . . . . . . . . . . . . . . . . 276 49.2 alloc . . . . . . . • println!(format, ..) виводить рядок у стандартний вивід, застосовуючи форматування, описане у std::fmt. • format!(format, ..) працює так само, як println!, але повертає результат у вигляді рядка. програмістів на C++: думайте про &str як про std::string_view з C++, але такий, що завжди вказує на дійсний рядок у пам'яті. Rust String є приблизним еквівалентом std::string з C++ (головна відмінність: він0 码力 | 396 页 | 1.08 MB | 10 月前3
Comprehensive Rust(Persian ) 202412Bare Metal : � � � 270 49 � � Bare Metal Rust � � � � � � � � 271 50 no_std 273 50.1 � � � � � � � � � � � � � � � � no_std . . . . . . . . . . . . . . . . . . . . . . . . . . 274 50.2 alloc . . . � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � ] std::fmt] (https://doc.rust-lang.org/std/fmt/index.html ( � � � � � � � � � � � � . . • format!(format , . . ( � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � . � � � � � � � String � � � � � � � � � � � std::string � � C + + � � � ) � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �0 码力 | 393 页 | 987.97 KB | 10 月前3
Comprehensive Rust ?Exercise Solutions 257 XI Bare Metal: Morning 258 49 Welcome to Bare Metal Rust 259 50 no_std 260 50.1 A minimal no_std program . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 50.2 alloc . . . . macros. • println!(format, ..) prints a line to standard output, applying formatting de- scribed in std::fmt. • format!(format, ..) works just like println! but returns the result as a string. • dbg!(expression) For C++ programmers: think of &str as std::string_view from C++, but the one that always points to a valid string in memory. Rust String is a rough equivalent of std::string from C++ (main difference: it0 码力 | 378 页 | 1009.46 KB | 1 年前3
Comprehensive Rust(English) 202412Exercise Solutions 262 XI Bare Metal: Morning 263 48 Welcome to Bare Metal Rust 264 49 no_std 266 49.1 A minimal no_std program . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 49.2 alloc . . . . macros. • println!(format, ..) prints a line to standard output, applying formatting de- scribed in std::fmt. • format!(format, ..) works just like println! but returns the result as a string. • dbg!(expression) For C++ programmers: think of &str as std::string_view from C++, but the one that always points to a valid string in memory. Rust String is a rough equivalent of std::string from C++ (main difference: it0 码力 | 382 页 | 1.00 MB | 10 月前3
Rust 语言学习笔记子模块,这里面包含了默认导入(std 库 是默认导入的,然后 std 库中的 prelude 下面的东西也是默认导入的)的所 有符号。 大体上有下面一些内容: std::marker::{Copy, Send, Sized, Sync} std::ops::{Drop, Fn, FnMut, FnOnce} std::mem::drop std::boxed::Box std::borrow::ToOwned std::borrow::ToOwned std::clone::Clone std::cmp::{PartialEq, PartialOrd, Eq, Ord} std::convert::{AsRef, AsMut, Into, From} std::default::Default std::iter::{Iterator, Extend, IntoIterator, DoubleEndedIterator DoubleEndedIterator, ExactSizeIterator} std::option::Option::{self, Some, None} std::result::Result::{self, Ok, Err} std::slice::SliceConcatExt std::string::{String, ToString} std::vec::Vec 在 baidu/rust-sgx-sdk0 码力 | 117 页 | 2.24 MB | 1 年前3
Comprehensive Rust(简体中文) 202412Together — Exercise 243 48 练习解答 244 XI 裸机:上午 245 49 Welcome to Bare Metal Rust 246 50 no_std 247 50.1 极小的 no_std 程序 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248 50.2 alloc . . . 准库包含各种有用的宏。 • println!(format, ..) prints a line to standard output, applying formatting described in std::fmt. • format!(format, ..) 的用法与 println! 类似,但它以字符串形式返回结果。 • dbg!(expression) 会记录表达式的值并返回该值。 • todo For C++ programmers: think of &str as std::string_view from C++, but the one that always points to a valid string in memory. Rust String is a rough equivalent of std::string from C++ (main difference: it0 码力 | 359 页 | 1.33 MB | 10 月前3
从零蛋开始学 RustArch isize usize ������ 340282366920938463463374607431768211455�� std::u128:MAX ��� ������ -170141183460469231731687303715884105728�� std::i128:MIN ��� ��������������� ��������� ����� � ����� ��: �������� ������ &str ��� ��� ������������� Rust ��������� ����� � &str ������������������� ���������������� std::str ������������������ Rust ������������ ��������������� ��� 7.1.1 �� uname ��������:: 9 fn name:String = String::from("TutorialsPoint"); | ---- move occurs because `name` has type `std::string::String`, which does not implement the `Copy` trait 3 | display(name); |0 码力 | 168 页 | 1.24 MB | 1 年前3
The Rust Programming Language,2nd Editionplayer to input a guess. Enter the code in Listing 2-1 into src/main.rs. Filename: src/main.rs 25 use std::io; fn main() { println!("Guess the number!"); println!("Please input your guess."); let mut guess (input/output) library into scope. The io library comes from the standard library (which is known as std): use std::io; By default, Rust brings only a few types into the scope of every program in the prelude in the prelude, you have to bring that type into scope explicitly with a use statement. Using the std::io library provides you with a number of useful io-related features, including the functionality to0 码力 | 617 页 | 1.54 MB | 1 年前3
Comprehensive Rust(Español) 202412265 XI Bare Metal: mañana 266 49 Te damos la bienvenida a Bare Metal Rust 267 50 no_std 269 50.1 Un programa no_std mínimo . . . . . . . . . . . . . . . . . . . . . . . . . . 270 50.2 alloc . . . . . ..) imprime una linea a la salida estándar (”standard output”), aplicando el formato descrito en std::fmt. • format!(format, ..) funciona igual que println!, pero devuelve el resultado en forma de cadena C++, pero uno que siempre apunta a una cadena válida en la memoria. El String de Rust es parecido a std::string de C++ (la diferencia principal es que solo puede contener bytes codificados en UTF-8 y nunca0 码力 | 389 页 | 1.04 MB | 10 月前3
Comprehensive Rust(Português do Brasil) 202412Exercícios 266 XI Bare Metal: Manhã 267 49 Bem-vindos ao Rust Bare Metal 268 50 no_std 270 50.1 Um programa no_std mínimo . . . . . . . . . . . . . . . . . . . . . . . . . 271 50.2 alloc . . . . . . úteis. • println!(format, ..) imprime uma linha na saída padrão, aplicando a formatação descrita em std::fmt. • format!(format, ..) funciona exatamente como println!, mas retorna o resultado como uma string que sempre aponta para uma string válida na memória. Em Rust, String é um equivalente aproximado de std::string de C++ (principal diferença: ele só pode conter bytes codificados em UTF-8 e nunca usará uma0 码力 | 389 页 | 1.05 MB | 10 月前3
共 34 条
- 1
- 2
- 3
- 4













