検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 193 for New (0.027 sec.)
Path - Rust By Example 日本語版 12060
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... // `&'static str`から`Path`を作成 let path = Path::new("."); // The `display` method returns a `Display`a ... sing the OS specific // separator, and returns the new path // `join`はOS固有のセパレータによってバイトの ... テナ型であるパス // を結合し、新しいパスを返す。 let new_path = path.join("a").join("b"); // Convert the pa ...
https://man.plustar.jp/rust/example/std_misc/path.html - [similar]
ファイルシステムとのやり取り - Rust By Example 日本語版 10245
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... let mut f = File::open(path)?; let mut s = String::new(); match f.read_to_string(&mut s) { Ok(_) => Ok(s) ... ath: &Path) -> io::Result<()> { match OpenOptions::new().create(true).write(true).open(path) { Ok(_) => O ... メソッドを用いて簡略化できる。 echo("hello", &Path::new("a/b.txt")).unwrap_or_else(|why| { println!("! {:? ...
https://man.plustar.jp/rust/example/std_misc/fs.html - [similar]
メソッド - Rust By Example 日本語版 9039
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... arguments: // もう一つ関連関数。引数を2つ取る。 fn new(x: f64, y: f64) -> Point { Point { x: x, y: y } } ... 挟んで呼び出される。 p1: Point::origin(), p2: Point::new(3.0, 4.0), }; // Methods are called using the dot ... uare = Rectangle { p1: Point::origin(), p2: Point::new(1.0, 1.0), }; // Error! `rectangle` is immutable, ...
https://man.plustar.jp/rust/example/fn/methods.html - [similar]
テストケース: 連結リスト - Rust By Example 日本語版 8637
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... t { // Create an empty list // 空リストの作成。 fn new() -> List { // `Nil` has type `List` // `Nil` は ` ... // Consume a list, and return the same list with a new element at its front // リストを受け取り、その始端 ... その第2要素もどちらもlist型である。 Cons(elem, Box::new(self)) } // Return the length of the list // list ...
https://man.plustar.jp/rust/example/custom_types/enum/testcase_linked_list.html - [similar]
エイリアス - Rust By Example 日本語版 8637
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... t of the code so it // is possible to reborrow let new_borrowed_point = &point; println!("Point now has c ... oordinates: ({}, {}, {})", new_borrowed_point.x, new_borrowed_point.y, new_borrow ...
https://man.plustar.jp/rust/example/scope/borrow/alias.html - [similar]
Box, スタックとヒープ - Rust By Example 日本語版 8637
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... このPointをヒープ上に割り当て、ポインタを返す。 Box::new(Point { x: 0.0, y: 0.0 }) } fn main() { // (all th ... ctangle let boxed_rectangle: Box<Rectangle> = Box::new(Rectangle { top_left: origin(), bottom_right: Poin ... り値をボックス化 let boxed_point: Box<Point> = Box::new(origin()); // Double indirection // 間にもう一つポ ...
https://man.plustar.jp/rust/example/std/box.html - [similar]
New Type Idiom - Rust By Example 日本語版 8235
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... fault) Rust Coal Navy Ayu Rust By Example 日本語版 New Type Idiom The newtype idiom gives compile time gu ... at the type supplied must be Years . To obtain the newtype 's value as the base type, you may use the tup ... ructs 関連キーワード: Years , years , age , 関数 , New , Idiom , Type , let , Result , Rust ...
https://man.plustar.jp/rust/example/generics/new_types.html - [similar]
文字列 - Rust By Example 日本語版 8235
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... }", pangram); // Iterate over words in reverse, no new string is allocated // 単語を逆順にイテレートする。 ... 、伸長可能な`String`を作成 let mut string = String::new(); for c in chars { // Insert a char at the end of ... string is a slice to the original string, hence no new // allocation is performed // 文字列のトリミング( ...
https://man.plustar.jp/rust/example/std/str.html - [similar]
Rust By Example 日本語版 8029
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... ordinates: ({}, {})", point.x, point.y); // Make a new point by using struct update syntax to use the fie ... t { // Create an empty list // 空リストの作成。 fn new() -> List { // `Nil` has type `List` // `Nil` は ` ... // Consume a list, and return the same list with a new element at its front // リストを受け取り、その始端 ...
https://man.plustar.jp/rust/example/print.html - [similar]
ミュータビリティ - Rust By Example 日本語版 7833
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ト 14.5. 複数のジェネリック境界 14.6. Where句 14.7. New Type Idiom 14.8. 関連型 ❱ 14.8.1. 関連型が必要にな ... リファレンスを取り、 // `year`を2014へ変更する。 fn new_edition(book: &mut Book) { book.year = 2014; print ... ミュータブルなオブジェクトをミュータブルに借用する new_edition(&mut mutabook); // Error! Cannot borrow an ... なオブジェクトをミュータブルに借用することはできない new_edition(&mut immutabook); // FIXME ^ Comment out t ...
https://man.plustar.jp/rust/example/scope/borrow/mut.html - [similar]
PREV 1 2 3 4 5 6 7 8 9 10 NEXT