検索

phrase: max: clip:
target: order:
Results of 21 - 29 of about 29 for let (0.034 sec.)
Drain 6868
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... { pub fn into_iter(self) -> IntoIter<T> { unsafe { let iter = RawValIter::new(&self); let buf = ptr::read ... > { pub fn drain(&mut self) -> Drain<T> { unsafe { let iter = RawValIter::new(&self); // これは mem::forg ...
https://man.plustar.jp/rust/nomicon/vec-drain.html - [similar]
チェックされないメモリ 6771
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... 初期化することを 認めません。配列を初期化するとき、 let x = [val; N] を用いて 全ての値を初期化するか、 let ... えないことを意味しますがね! const SIZE: usize = 10; let mut x: [Box<u32>; SIZE]; unsafe { // Rust に x が完 ...
https://man.plustar.jp/rust/nomicon/unchecked-uninit.html - [similar]
高階トレイト境界 6673
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... t(data: &(u8, u16)) -> &u8 { &data.0 } fn main() { let clo = Closure { data: (0, 1), func: do_it }; print ... , u16)) -> &'b u8 { &'b data.0 } fn main() { 'x: { let clo = Closure { data: (0, 1), func: do_it }; print ...
https://man.plustar.jp/rust/nomicon/hrtb.html - [similar]
Subtyping and Variance 6526
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... nt over 'a when introducing subtyping: it's desirable to be able to pass longer-lived things where shorte ... to why it should be variant over T. It is reasonable to be able to pass &&'static str where an &&'a str ... of indirection does not change the desire to be able to pass longer lived things where shorted lived thi ... mut T, new: &mut T) { *input = *new; } fn main() { let mut forever_str: &'static str = "hello"; { let str ...
https://man.plustar.jp/rust/nomicon/subtyping.html - [similar]
奇妙なサイズの型 6477
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... パイルに通るようにも できる でしょう。 enum Void {} let res: Result<u32, Void> = Ok(0); // Err は存在しない ... ので、Ok になることに疑問の余地はありません。 let Ok(num) = res; ただし、どちらの例も現時点では動きま ...
https://man.plustar.jp/rust/nomicon/exotic-sizes.html - [similar]
型変換 6379
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... : u32, b: u16, } fn reinterpret(foo: Foo) -> Bar { let Foo { x, y } = foo; Bar { a: x, b: y } } } しかしこ ...
https://man.plustar.jp/rust/nomicon/conversions.html - [similar]
挿入と削除 6379
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... n, "index out of bounds"); unsafe { self.len -= 1; let result = ptr::read(self.ptr.offset(index as isize) ...
https://man.plustar.jp/rust/nomicon/vec-insert-remove.html - [similar]
Atomics 6232
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... er Reordering Compilers fundamentally want to be able to do all sorts of complicated transformations to r ... = 3; This has inverted the order of events and completely eliminated one event. From a single-threaded pe ... rspective this is completely unobservable: after all the statements have exe ... y was assigned. We would like the compiler to be able to make these kinds of optimizations, because they ...
https://man.plustar.jp/rust/nomicon/atomics.html - [similar]
デストラクタ 6232
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... `box` フィールドを `None` と設定する必要があります let my_box = self.my_box.take().unwrap(); heap::deallo ...
https://man.plustar.jp/rust/nomicon/destructors.html - [similar]
PREV 1 2 3 NEXT