検索

phrase: max: clip:
target: order:
Results of 1 - 9 of about 9 for Iter (0.019 sec.)
Drain 12528
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... yu Drain Drain に移行しましょう。 Drain は大体 IntoIter と同じですが、 Vec を消費 する代わりに、 Vec を借用 ... <T>> start: *const T, end: *const T, } impl<'a, T> Iterator for Drain<'a, T> { type Item = T; fn next(&mut ... った、何か似ているな。もっと圧縮してみましょう。 IntoIter と Drain は両方同じ構造を持っています。抽出しましょ ...
https://man.plustar.jp/rust/nomicon/vec-drain.html - [similar]
Final Code 11899
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... isize), self.len - index); result } } pub fn into_iter(self) -> IntoIter<T> { unsafe { let iter = RawValI ... buf = ptr::read(&self.buf); mem::forget(self); IntoIter { iter: iter, _buf: buf, } } } pub fn drain(&mut s ... elf) -> Drain<T> { unsafe { let iter = RawValIter::new(&self); // this is a mem::forget ...
https://man.plustar.jp/rust/nomicon/vec-final.html - [similar]
PhantomData 9059
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... commonly occurs with lifetimes. For instance, the Iter for &'a [T] is (approximately) defined as follows: ... struct Iter<'a, T: 'a> { ptr: *const T, end: *const T, } Howev ... eful such as the information needed by drop check. Iter logically contains a bunch of &'a T s, so this is ...
https://man.plustar.jp/rust/nomicon/phantom-data.html - [similar]
借用の分割 8430
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... に定義されます。 #![allow(unused)] fn main() { trait Iterator { type Item; fn next(&mut self) -> Option<Self ... イテレータがその場限りのオブジェクトであるからです。 IterMut が生成するすべてのものは高々 1 回しか生成されま ... struct LinkedList<T> { head: Link<T>, } pub struct IterMut<'a, T: 'a>(Option<&'a mut Node<T>>); impl<T> Li ...
https://man.plustar.jp/rust/nomicon/borrow-splitting.html - [similar]
IntoIter 8322
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... utex の実装 Light (default) Rust Coal Navy Ayu IntoIter イテレータに移行しましょう。 Deref の魔法のおかげで ...iteriter_mut は 既に書かれています。しかし、 Vec が ... できない 2 つの 興味深いイテレータがあります。 into_iter と drain です。 IntoIter は Vec を値として消費しま ...
https://man.plustar.jp/rust/nomicon/vec-into-iter.html - [similar]
参照外し 7909
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... st 、 last 、 インデックス参照、スライス、ソート、 iteriter_mut 、そして他のスライスによって提供される ...
https://man.plustar.jp/rust/nomicon/vec-deref.html - [similar]
print.html 7801
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... and // 展開した場合 fn new(buf: &mut [u8]) -> BufWriter; // 省略した場合 fn new<'a>(buf: &'a mut [u8]) -> ... BufWriter<'a> // 展開した場合 無制限のライフタイム アンセーフ ... box<'a>(str: &'a str) -> Box<&'a str> { // string literals are `&'static str`s Box::new("hello") } } Weake ...
https://man.plustar.jp/rust/nomicon/print.html - [similar]
RawVec 7495
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... 興味深い状況に突入しました。すなわち、 Vec と IntoIter の、バッファの指定と メモリの解放の論理が重複してい ... ートは RawVec が対処します } } 最終的に、本当に IntoIter が単純になります。 struct IntoIter<T> { _buf: RawV ... ないため、文字通り変更しません impl<T> Drop for IntoIter<T> { fn drop(&mut self) { // 全ての要素が確実に読ま ...
https://man.plustar.jp/rust/nomicon/vec-raw.html - [similar]
例外安全性 7387
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... ケーティング 9.5. 参照外し 9.6. 挿入と削除 9.7. IntoIter 9.8. RawVec 9.9. Drain 9.10. サイズが 0 の型を扱う ... self.len() + to_push.len()); for (i, x) in to_push.iter().enumerate() { self.ptr().offset(i as isize).writ ...
https://man.plustar.jp/rust/nomicon/exception-safety.html - [similar]
PREV 1 NEXT