検索

phrase: max: clip:
target: order:
Results of 1 - 10 of about 47 for not (0.049 sec.)
Rust By Example 日本語版 12510
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... re two slashes at the beginning of the line // And nothing written inside these will be read by the compi ... ラッシュを消去してから実行してください /* * This is another type of comment, a block comment. In general, * ... こちらはデバッグ時に * 役立つ場合があります。 */ /* Note: The previous column of `*` was entirely for styl ... re require more complicated // handling. This will not work. // このようにカスタム型を用いる場合、少々扱い ...
https://man.plustar.jp/rust/example/print.html - [similar]
cfg - Rust By Example 日本語版 11552
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... s function only gets compiled if the target OS is *not* linux // そしてこの関数はターゲットOSがLinux *では ... ない* ときのみコンパイルされる。 #[cfg(not(target_os = "linux"))] fn are_you_on_linux() { pri ... ntln!("You are *not* running linux!"); } fn main() { are_you_on_linux( ... linux!"); } else { println!("Yes. It's definitely *not* linux!"); } } 参照 参照( reference ) , cfg! , マク ...
https://man.plustar.jp/rust/example/attribute/cfg.html - [similar]
スタティックライフタイム - Rust By Example 日本語版 11081
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ait bound As a trait bound, it means the type does not contain any non-static references. Eg. the receive ... but a reference to that owned data generally does not: use std::fmt::Debug; fn print_it( input: impl Deb ... ifetime defined by the scope of // main(), so it's not 'static: print_it(&i); } The compiler will tell yo ... u: error[E0597]: `i` does not live long enough --> src/lib.rs:15:15 | 15 | print ...
https://man.plustar.jp/rust/example/scope/lifetime/static_lifetime.html - [similar]
関数 - Rust By Example 日本語版 10838
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... `_s` of type `S`. // This has no `<T>` so this is not a generic function. // `S`という型の引数`_s`をとる ... given the type parameter `A`, but because `A` has not // been specified as a generic type parameter for ... `gen_spec_t`, it is not generic. // `gen_spec_t`という関数を定義。これは`A ... 32`, which is a specific type. // Because `i32` is not a generic type, this function is also not generic. ...
https://man.plustar.jp/rust/example/generics/gen_fn.html - [similar]
引数のパース - Rust By Example 日本語版 10367
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... ln!("This is the answer!"), _ => println!("This is not the answer."), } }, // one command and one argumen ... n }, Err(_) => { eprintln!("error: second argument not an integer"); help(); return; }, }; // parse the c ... ージを表示 help(); } } } $ ./match_args Rust This is not the answer. $ ./match_args 42 This is the answer! ... $ ./match_args do something error: second argument not an integer usage: match_args <string> Check whethe ...
https://man.plustar.jp/rust/example/std_misc/arg/matching.html - [similar]
impl Trait - Rust By Example 日本語版 9895
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... If the line was read successfully, process it, if not, return the error line.split(',') // Split the lin ... ufRead, such as BufReader<File> or [u8] , but it's not important what type R is, and R is only used to de ... If the line was read successfully, process it, if not, return the error line.split(',') // Split the lin ... t() // Collect all lines into a Vec<Vec<String>> } Note that using impl Trait as an argument type means t ...
https://man.plustar.jp/rust/example/trait/impl_trait.html - [similar]
文字列 - Rust By Example 日本語版 9409
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... できるのと同様です。 fn main() { // (all the type annotations are superfluous) // A reference to a string ... . If you want a literal backslash, escape it with another one: \\ String or character literal delimiters ... n!("{}", longer_delimiter); } Want a string that's not UTF-8? (Remember, str and String must be valid UTF ... trings to the rescue! use std::str; fn main() { // Note that this is not actually a `&str` let bytestring ...
https://man.plustar.jp/rust/example/std/str.html - [similar]
ポインタとref - Rust By Example 日本語版 8938
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... se the right side was already a reference. This is not // a reference because the right side is not one. ... のでリファレンスでしたが、 // これは違います。 let _not_a_reference = 3; // Rust provides `ref` for exactl ...
https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
テストケース: 単位を扱う - Rust By Example 日本語版 8694
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... f + RHS = Output` // where RHS defaults to Self if not specified in the implementation. // このように定義 ... ype with phantom type parameter `Unit`, /// and is not generic over the length type (that is `f64`). /// ... // Since `Length` implements `Copy`, `add()` does not consume // `one_foot` and `one_meter` but copies t ...
https://man.plustar.jp/rust/example/generics/phantom/testcase_units.html - [similar]
構造体 - Rust By Example 日本語版 7980
Introduction 1. Hello World ❱ 1.1. コメント 1.2. フォーマットしてプリント ❱ 1.2.1. デバッグ 1.2. ... structs and rename the variables, // the order is not important // 構造体をデストラクトして変数をリネーム ... t x", y), // this will give an error: pattern does not mention field `x` // `x`に言及していないため、以下 ...
https://man.plustar.jp/rust/example/flow_control/match/destructuring/destructure... - [similar]
PREV 1 2 3 4 5 NEXT