検索

phrase: max: clip:
target: order:
Results of 1 - 1 of about 1 for MockMessenger (0.013 sec.)
RefCell<T>と内部可変性パターン - Rust 日本語版 9414
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... () { #[cfg(test)] mod tests { use super::*; struct MockMessenger { sent_messages: Vec<String>, } impl MockMessenger ... { fn new() -> MockMessenger { MockMessenger { sent_messages: vec![] } } } impl ... Messenger for MockMessenger { fn send(&self, message: &str) { self.sent_messag ... 5_percent_warning_message() { let mock_messenger = MockMessenger::new(); let mut limit_tracker = LimitTracker::new( ...
https://man.plustar.jp/rust/book/ch15-05-interior-mutability.html - [similar]
PREV 1 NEXT