検索
Results of 1 - 4 of about 4 for content (0.003 sec.)
- オブジェクト指向デザインパターンを実装する - Rust 日本語版 12223
- The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello,
...ate a salad for lunch today"); assert_eq!("", post.content()); post.request_review(); assert_eq!("", post.con...; assert_eq!("I ate a salad for lunch today", post.content()); } リスト17-11: blog クレートに欲しい振る舞いを...れに対する素晴らしい単体テストは、ブログ記事の草稿が content メソッドから空の文字列を返すことをアサートすること...を要求できるようにしたく、また査読を待機している間は content に空の文字列を返してほしいです。 記事が承認を受けた... - https://man.plustar.jp/rust/book/ch17-03-oo-design-patterns.html - [similar]
- トレイト:共通の振る舞いを定義する - Rust 日本語版 9320
- The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello,
...ing, pub location: String, pub author: String, pub content: String, } impl Summary for NewsArticle { fn summa...) } } pub struct Tweet { pub username: String, pub content: String, pub reply: bool, pub retweet: bool, } imp...-> String { format!("{}: {}", self.username, self.content) } } } リスト10-13: Summary トレイトを NewsArticle...= Tweet { username: String::from("horse_ebooks"), content: String::from( // もちろん、ご存知かもしれませんが... - https://man.plustar.jp/rust/book/ch10-02-traits.html - [similar]
- 正常なシャットダウンと片付け - Rust 日本語版 7729
- The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello,
...ラーです: error[E0507]: cannot move out of borrowed content --> src/lib.rs:65:13 | 65 | worker.thread.join().u...nwrap(); | ^^^^^^ cannot move out of borrowed content 各 worker の可変参照しかなく、 join は引数の所有権...mut file = File::open(filename).unwrap(); let mut contents = String::new(); file.read_to_string(&mut content...rap(); let response = format!("{}{}", status_line, contents); stream.write(response.as_bytes()).unwrap(); str... - https://man.plustar.jp/rust/book/ch20-03-graceful-shutdown-and-cleanup.html - [similar]
- 参照と借用 - Rust 日本語版 7655
- The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello,
...です: error[E0596]: cannot borrow immutable borrowed content `*some_string` as mutable (エラー: 不変な借用をした... - https://man.plustar.jp/rust/book/ch04-02-references-and-borrowing.html - [similar]
PREV
1
NEXT