pub unsafe trait StableBuf:
Unpin
+ Send
+ 'static {
// Required methods
fn stable_ptr(&self) -> *const u8;
fn len(&self) -> usize;
// Provided method
fn as_ref(&self) -> &[u8] ⓘ { ... }
}
Expand description
A buffer with a stable memory address.
§Safety
The implementor must guarantee that the pointer remains valid and unchanged while the buffer is being used.
Required Methods§
Sourcefn stable_ptr(&self) -> *const u8
fn stable_ptr(&self) -> *const u8
Returns a raw pointer to this buffer.