検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 31 for return (0.027 sec.)
impl Trait - Rust By Example 日本語版 13540
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... be used in two locations: as an argument type as a return type As an argument type If your function is gener ... he line was read successfully, process it, if not, return the error line.split(',') // Split the line separa ... he line was read successfully, process it, if not, return the error line.split(',') // Split the line separa ...
https://man.plustar.jp/rust/example/trait/impl_trait.html - [similar]
関数 - Rust By Example 日本語版 12262
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... 式が返り値となります。関数の途中で値を返したい場合は return 文を使用します。 loop の最中や if 文の中からも値を ... もかまわない。 fizzbuzz_to(100); } // Function that returns a boolean value // ブーリアン型を返す関数 fn is_d ... hs: u32, rhs: u32) -> bool { // Corner case, early return // 例外的な引数を受けた場合、早めに返す。 if rhs = ...
https://man.plustar.jp/rust/example/fn.html - [similar]
Diverging functions - Rust By Example 日本語版 10984
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... 本語版 Diverging functions Diverging functions never return. They are marked using ! , which is an empty type. ... n main() { fn foo() -> ! { panic!("This call never returns."); } } As opposed to all the other types, this o ... tly one possible value. For example, this function returns as usual, although there is no information in the ...
https://man.plustar.jp/rust/example/fn/diverging.html - [similar]
Returning Traits with dyn - Rust By Example 日本語版 10466
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... fault) Rust Coal Navy Ayu Rust By Example 日本語版 Returning Traits with dyn The Rust compiler needs to know ... how much space every function's return type requires. This means all your functions have ... to return a concrete type. Unlike other languages, if you ha ...
https://man.plustar.jp/rust/example/trait/dyn.html - [similar]
Rust By Example 日本語版 9835
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... editable, feel free to hack it! // You can always return to the original code by clicking the "Reset" butto ... t element into the supplied output // stream: `f`. Returns `fmt::Result` which indicates whether the // oper ... // Try `write!` to see if it errors. If it errors, return // the error. Otherwise continue. // `write!`を実行 ...
https://man.plustar.jp/rust/example/print.html - [similar]
Combinators: map - Rust By Example 日本語版 8816
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... d(Food); // Peeling food. If there isn't any, then return `None`. // Otherwise, return the peeled food. // 食 ... ne, } } // Chopping food. If there isn't any, then return `None`. // Otherwise, return the chopped food. // ...
https://man.plustar.jp/rust/example/error/option_unwrap/map.html - [similar]
テストケース: リスト - Rust By Example 日本語版 8299
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... // Try `write!` to see if it errors. If it errors, return // the error. Otherwise continue. // `write!`を実行 ... t the first, add a comma. // Use the ? operator to return on errors. if count != 0 { write!(f, ", ")?; } wri ... e!(f, "{}", v)?; } // Close the opened bracket and return a fmt::Result value. // 開きっぱなしのブラケットを ...
https://man.plustar.jp/rust/example/hello/print/print_display/testcase_list.html - [similar]
テストケース: 連結リスト - Rust By Example 日本語版 8169
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... ` は `List`型を持つ。 Nil } // Consume a list, and return the same list with a new element at its front // リ ... ちらもlist型である。 Cons(elem, Box::new(self)) } // Return the length of the list // list の長さを返すメソッド ... ro length // 空リストならば長さは0 Nil => 0 } } // Return representation of the list as a (heap allocated) s ...
https://man.plustar.jp/rust/example/custom_types/enum/testcase_linked_list.html - [similar]
イテレータ - Rust By Example 日本語版 8169
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... ine the sequence using `.curr` and `.next`. // The return type is `Option<T>`: // * When the `Iterator` is f ... inished, `None` is returned. // * Otherwise, the next value is wrapped in `S ... ome` and returned. // We use Self::Item in the return type, so we ...
https://man.plustar.jp/rust/example/trait/iter.html - [similar]
早期リターン - Rust By Example 日本語版 7781
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... .4.9. 省略 16. トレイト ❱ 16.1. 継承(Derive) 16.2. Returning Traits with dyn 16.3. 演算子のオーバーロード 16 ... 2>() { Ok(first_number) => first_number, Err(e) => return Err(e), }; let second_number = match second_number ... () { Ok(second_number) => second_number, Err(e) => return Err(e), }; Ok(first_number * second_number) } fn p ...
https://man.plustar.jp/rust/example/error/result/early_returns.html - [similar]
PREV 1 2 3 4 NEXT