検索
Results of 11 - 20 of about 193 for string (0.048 sec.)
- open - Rust By Example 日本語版 6942
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
The `description` method of `io::Error` returns a string that // describes the error // `io::Error`の`descr...
file) => file, }; // Read the file contents into a string, returns `io::Result<usize>` // ファイルの中身を文...
に読み込む。`io::Result<useize>`を返す。 let mut s = String::new(); match file.read_to_string(&mut s) { Err(wh...
- https://man.plustar.jp/rust/example/std_misc/file/open.html - [similar]
- Disambiguating overlapping traits - Rust By Example 日本語版 6584
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
ected username out of this widget fn get(&self) -> String; } trait AgeWidget { // Get the selected age out o...
ameWidget and an AgeWidget struct Form { username: String, age: u8, } impl UsernameWidget for Form { fn get(...
&self) -> String { self.username.clone() } } impl AgeWidget for For...
- https://man.plustar.jp/rust/example/trait/disambiguating.html - [similar]
- Rc - Rust By Example 日本語版 6486
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
Rc; fn main() { let rc_examples = "Rc examples".to_string(); { println!("--- rc_a is created ---"); let rc_a...
: Rc<String> = Rc::new(rc_examples); println!("Reference Count...
n!("--- rc_a is cloned to rc_b ---"); let rc_b: Rc<String> = Rc::clone(&rc_a); println!("Reference Count of...
- https://man.plustar.jp/rust/example/std/rc.html - [similar]
- FromおよびInto - Rust By Example 日本語版 6399
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
のトレイトが多数実装されています。 例えば、 str から String への型変換は簡単です。 #![allow(unused)] fn main()...
{ let my_str = "hello"; let my_string = String::from(my_str); } 自作の型に対しても、型変...
- https://man.plustar.jp/rust/example/conversion/from_into.html - [similar]
- 識別子 - Rust By Example 日本語版 6399
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
($func_name:ident) => { fn $func_name() { // The `stringify!` macro converts an `ident` into a string. // `...
t`を文字列に変える。 println!("You called {:?}()", stringify!($func_name)); } }; } // Create functions named...
an expression of type `expr` and prints // it as a string along with its result. // The `expr` designator is...
- https://man.plustar.jp/rust/example/macros/designators.html - [similar]
- パイプ - Rust By Example 日本語版 6399
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
: {}", why), Ok(process) => process, }; // Write a string to the `stdin` of `wc`. // `wc`の`stdin`に文字列を...
dout>`型なのでアンラップする必要がある let mut s = String::new(); match process.stdout.unwrap().read_to_stri...
- https://man.plustar.jp/rust/example/std_misc/process/pipe.html - [similar]
- Documentation testing - Rust By Example 日本語版 6399
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
ill compileable! /// # fn try_main() -> Result<(), String> { // line that wraps the body shown in doc /// le...
``` pub fn try_div(a: i32, b: i32) -> Result<i32, String> { if b == 0 { Err(String::from("Divide-by-zero"))...
- https://man.plustar.jp/rust/example/testing/doc_testing.html - [similar]
- テストケース: 連結リスト - Rust By Example 日本語版 6312
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
n representation of the list as a (heap allocated) string // Listをheap上の文字列として表したものを返すメソッ...
ド。 fn stringify(&self) -> String { match *self { Cons(head, ref...
milar to `print!`, but returns a heap // allocated string instead of printing to the console // `format!`は`...
- https://man.plustar.jp/rust/example/custom_types/enum/testcase_linked_list.html - [similar]
- ドキュメンテーション - Rust By Example 日本語版 6312
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
嫌っていようと、 /// 人物には名前が必要です。 name: String, } impl Person { /// Returns a person with the nam...
返します。 /// /// # Arguments /// /// * `name` - A string slice that holds the name of the person /// * `nam...
new(name: &str) -> Person { Person { name: name.to_string(), } } /// Gives a friendly hello! /// フレンドリー...
- https://man.plustar.jp/rust/example/meta/doc.html - [similar]
- 複数のジェネリック境界 - Rust By Example 日本語版 6127
- Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2.
...
6.1. FromおよびInto 6.2. TryFromおよびTryInto 6.3. Stringとの型変換 7. 式 8. 条件分岐 ❱ 8.1. if/else 8.2. loo...
", t); println!("u: `{:?}`", u); } fn main() { let string = "words"; let array = [1, 2, 3]; let vec = vec![1...
, 2, 3]; compare_prints(&string); //compare_prints(&array); // TODO ^ Try uncommen...
- https://man.plustar.jp/rust/example/generics/multi_bounds.html - [similar]