検索

phrase: max: clip:
target: order:
Results of 1 - 4 of about 4 for height (0.011 sec.)
メソッド記法 - Rust 日本語版 10725
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... rs #[derive(Debug)] struct Rectangle { width: u32, height: u32, } impl Rectangle { fn area(&self) -> u32 { s ... elf.width * self.height } } fn main() { let rect1 = Rectangle { width: 30, ... height: 50 }; println!( "The area of the rectangle is {} ... .rs fn main() { let rect1 = Rectangle { width: 30, height: 50 }; let rect2 = Rectangle { width: 10, height: ...
https://man.plustar.jp/rust/book/ch05-03-method-syntax.html - [similar]
構造体を使ったプログラム例 - Rust 日本語版 10485
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... イル名: src/main.rs fn main() { let width1 = 30; let height1 = 50; println!( // 長方形の面積は、{}平方ピクセル ... the rectangle is {} square pixels.", area(width1, height1) ); } fn area(width: u32, height: u32) -> u32 { w ... idth * height } リスト5-8: 個別の幅と高さ変数を指定して長方形の面 ... ea のシグニチャから明らかです: fn area(width: u32, height: u32) -> u32 { area 関数は、1長方形の面積を求めるも ...
https://man.plustar.jp/rust/book/ch05-02-example-structs.html - [similar]
テストの記述法 - Rust 日本語版 9634
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... rs #[derive(Debug)] struct Rectangle { width: u32, height: u32, } impl Rectangle { fn can_hold(&self, other: ... tangle) -> bool { self.width > other.width && self.height > other.height } } fn main() {} リスト11-5: 第5章か ... rs #[derive(Debug)] struct Rectangle { width: u32, height: u32, } impl Rectangle { fn can_hold(&self, other: ... tangle) -> bool { self.width > other.width && self.height > other.height } } #[cfg(test)] mod tests { use su ...
https://man.plustar.jp/rust/book/ch11-01-writing-tests.html - [similar]
トレイトオブジェクトで異なる型の値を許容する - Rust 日本語版 6121
The Rust Programming Language 日本語版 まえがき はじめに 1. 事始め 1.1. インストール 1.2. Hello, ... になるか想像するために、 Button 構造体は、 width 、 height 、 label フィールドを持っている可能性があります。 ... (&self); } pub struct Button { pub width: u32, pub height: u32, pub label: String, } impl Draw for Button { ... イトを実装するある 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