検索

phrase: max: clip:
target: order:
Results of 1 - 4 of about 4 for width (0.012 sec.)
メソッド記法 - Rust 日本語版 10577
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... 名: src/main.rs #[derive(Debug)] struct Rectangle { width: u32, height: u32, } impl Rectangle { fn area(&sel ... f) -> u32 { self.width * self.height } } fn main() { let rect1 = Rectangl ... e { width: 30, height: 50 }; println!( "The area of the rect ... 名: src/main.rs fn main() { let rect1 = Rectangle { width: 30, height: 50 }; let rect2 = Rectangle { width: ...
https://man.plustar.jp/rust/book/ch05-03-method-syntax.html - [similar]
構造体を使ったプログラム例 - Rust 日本語版 10337
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... 示しました。 ファイル名: src/main.rs fn main() { let width1 = 30; let height1 = 50; println!( // 長方形の面積 ... area of the rectangle is {} square pixels.", area(width1, height1) ); } fn area(width: u32, height: u32) - ... > u32 { width * height } リスト5-8: 個別の幅と高さ変数を指定して ... 問題点は、 area のシグニチャから明らかです: fn area(width: u32, height: u32) -> u32 { area 関数は、1長方形の ...
https://man.plustar.jp/rust/book/ch05-02-example-structs.html - [similar]
テストの記述法 - Rust 日本語版 9985
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... ル名: src/lib.rs #[derive(Debug)] struct Rectangle { width: u32, height: u32, } impl Rectangle { fn can_hold( ... &self, other: &Rectangle) -> bool { self.width > other.width && self.height > other.height } } fn ... ル名: src/lib.rs #[derive(Debug)] struct Rectangle { width: u32, height: u32, } impl Rectangle { fn can_hold( ... &self, other: &Rectangle) -> bool { self.width > other.width && self.height > other.height } } #[ ...
https://man.plustar.jp/rust/book/ch11-01-writing-tests.html - [similar]
トレイトオブジェクトで異なる型の値を許容する - Rust 日本語版 6047
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... どんな感じになるか想像するために、 Button 構造体は、 width 、 height 、 label フィールドを持っている可能性があ ... t Draw { fn draw(&self); } pub struct Button { pub width: u32, pub height: u32, pub label: String, } impl D ... raw トレイトを実装するある Button 構造体 Button の width 、 height 、 label フィールドは、 TextField 型のよ ... ような型には適用されません。 ライブラリの使用者が、 width 、 height 、 options フィールドのある SelectBox 構 ...
https://man.plustar.jp/rust/book/ch17-02-trait-objects.html - [similar]
PREV 1 NEXT