bare
API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.
raw pointers, transmute, raw allocation, pinning and
volatile access, over the runtime's extern "nabi" symbols only. Never
in the prelude: code that needs it says use bare::... The named
casts live at the tier root.
Modules
allocraw allocation outside the GC.ffiC's types (types, also in the prelude), errno (errno), Nabi values C holds (handle), NUL-terminated C strings (wide:wchar_tones), loading shared libraries (library);witis what the WIT bindings run on;objc, Objective-C objects, exists only on Apple targets.gcthe collector's controls, and keeping GC objects in place for raw pointers.memraw memory operations,Podand bit casts.ptrraw pointers.volatileaccesses the optimizer keeps exactly as written: MMIO, signal flags, DMA buffers.
Re-exports
mem::{Pod, reinterpret, transmute_unchecked}Source
pub use mem::{Pod, reinterpret, transmute_unchecked}PodPlain old data: every bit pattern of the type is a valid value, its layout is fixed and it has noDrop.reinterpretThe bits ofaas aB; both arePodand the same size (a size mismatch panics).transmute_uncheckedThe bits ofaas aB, unchecked: validity, size and the GC references inside are the caller's problem.
ptr::{align_cast, align_cast_unchecked, const_cast, ptr_cast}Source
pub use ptr::{align_cast, align_cast_unchecked, const_cast, ptr_cast}align_castpas aPtr<T>when its address suitsT's alignment.align_cast_uncheckedpas aPtr<T>with no alignment check, not even in debug builds.const_castDrop theconst: writing through the result is the caller's responsibility.ptr_castThe same address as a pointer toU(ptr_cast::<U>(p); alignment is the caller's problem).