検索

phrase: max: clip:
target: order:
Results of 1 - 8 of about 8 for we (0.020 sec.)
Atomics 12109
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... is pretty bad at modeling atomics. At very least, we can benefit from existing tooling and research aro ... heck out C's specification (Section 7.17) . Still, we'll try to cover the basics and some of the problem ... is fundamentally about trying to bridge the gap between the semantics we want, the optimizations compile ... nt, and the inconsistent chaos our hardware wants. We would like to just write programs and have them do ...
https://man.plustar.jp/rust/nomicon/atomics.html - [similar]
Drop Check 11151
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... の実装 Light (default) Rust Coal Navy Ayu Drop Check We have seen how lifetimes provide us some fairly sim ... ple rules for ensuring that we never read dangling references. However up to this ... point we have only ever interacted with the outlives relati ... onship in an inclusive manner. That is, when we talked about 'a: 'b , it was ok for 'a to live exa ...
https://man.plustar.jp/rust/nomicon/dropck.html - [similar]
PhantomData 10067
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... avy Ayu PhantomData When working with unsafe code, we can often end up in a situation where types or lif ... ter<'a, T: 'a> { ptr: *const T, end: *const T, } However because 'a is unused within the struct's body, ... pes are forbidden in struct definitions. Therefore we must somehow refer to these types in the body. Cor ... essary to have correct variance and drop checking. We do this using PhantomData , which is a special mar ...
https://man.plustar.jp/rust/nomicon/phantom-data.html - [similar]
print.html 8621
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... borrow `foo` as immutable because it is also borrowed as mutable (エラー: `foo`は可変で借用されているの ... , borrows, or modification of `foo` until the borrow ends (注釈: 以前の`foo`の借用はここで起きています。 ... share(); ^~~ <anon>:12:2: 12:2 note: previous borrow ends here (注釈: 以前の借用はここで終了しています) ... tirely from lifetimes. Since lifetimes are scopes, we can partially order them based on the contains (ou ...
https://man.plustar.jp/rust/nomicon/print.html - [similar]
Final Code 8458
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... fe { let elem_size = mem::size_of::<T>(); // since we set the capacity to usize::MAX when elem_size is / ... ew_cap, ptr) }; // If allocate or reallocate fail, we'll get `null` back if ptr.is_null() { oom() } self ... offset(self.len as isize), elem); } // Can't fail, we'll OOM first. self.len += 1; } pub fn pop(&mut sel ... a mem::forget safety thing. If Drain is forgotten, we just // leak the whole Vec's contents. Also we nee ...
https://man.plustar.jp/rust/nomicon/vec-final.html - [similar]
Subtyping and Variance 8187
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... tirely from lifetimes. Since lifetimes are scopes, we can partially order them based on the contains (ou ... tlives) relationship. We can even express this as a generic bound. Subtypin ... rly arbitrary construct that some disagree with. However it simplifies our analysis to treat lifetimes a ... familiar with variance from other languages, what we refer to as "just" variance is in fact covariance ...
https://man.plustar.jp/rust/nomicon/subtyping.html - [similar]
Send and Sync 6886
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... r thread. A type is Sync if it is safe to share between threads ( &T is Send). Send and Sync are fundame ... they enable unsynchronized shared mutable state. However raw pointers are, strictly speaking, marked as ... be "fine" for them to be marked as thread safe. However it's important that they aren't thread safe to ... nking hard about thread safety. In the case of Rc, we have a nice example of a type that contains a *mut ...
https://man.plustar.jp/rust/nomicon/send-and-sync.html - [similar]
アロケーティング 6741
はじめに 1. 安全と危険のご紹介 1.1. 安全と危険の相互作用 1.2. Unsafe と連携する 2. データレイアウ ... が出来ていません assert!(mem::size_of::<T>() != 0, "We're not ready to handle ZSTs"); unsafe { // EMPTY を ...
https://man.plustar.jp/rust/nomicon/vec-alloc.html - [similar]
PREV 1 NEXT