Skip to main contentCrate zr
Source - define_opaque_storage_ffi
- Defines an opaque C++ storage type with explicit size, alignment, and an FFI
init function. - pin_init_ffi
- A helper macro to initialize a pinned object in-place using a raw FFI constructor.
- static_assert
- Compile-time assertion.
Fails to compile if the condition is false.
- static_assert_size_and_align
- Compile-time assertion that a type’s size is <=
max_size and alignment == expected_align. - unsafe_pinned_drop_ffi
- A helper macro to implement
PinnedDrop using a raw FFI destructor.
- AtomicConstPtr
- An atomic pointer type which operates on
*const T. - Deferred
- A guard that executes an action when dropped, unless cancelled.
- Opaque
- A wrapper for types that are opaque to Rust.
- OpaqueFacade
- A zero-sized type representing an opaque C++ object facade.
- ToMutPtr
- Extension trait for references to obtain a mutable raw pointer.
- defer
- Schedules an action to be executed when the returned guard is dropped.
- from_utf8_lossy
- Wraps a binary string that may contain non-UTF-8 bytes for formatting.
Invalid bytes are formatted as
\u{FFFFD}. - parse_usize
- Parse a decimal integer from a string slice at compile time.
- slice_from_raw_parts⚠
- Forms a slice from an FFI pointer and a length, returning an empty slice
&[] when len == 0
even if data is null or misaligned. - slice_from_raw_parts_mut⚠
- Performs the same functionality as
slice_from_raw_parts, except that a mutable slice is
returned. - to_array
- Copy a string slice into a fixed-size byte array at compile time, leaving space for a null
terminator.
- OpaqueBytes
- A generic, safe opaque storage container with exact const size constraints.