diff options
Diffstat (limited to 'crates/windows-kernel-rs/src/user_ptr.rs')
| -rw-r--r-- | crates/windows-kernel-rs/src/user_ptr.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/windows-kernel-rs/src/user_ptr.rs b/crates/windows-kernel-rs/src/user_ptr.rs index 54dcb58..223cee6 100644 --- a/crates/windows-kernel-rs/src/user_ptr.rs +++ b/crates/windows-kernel-rs/src/user_ptr.rs @@ -16,6 +16,8 @@ pub enum UserPtr { } impl UserPtr { + /// # Safety + /// `unsafe` pub unsafe fn new_buffered(ptr: *mut cty::c_void, read_size: usize, write_size: usize) -> Self { Self::Buffered { ptr, @@ -24,6 +26,8 @@ impl UserPtr { } } + /// # Safety + /// `unsafe` pub unsafe fn new_direct( read_ptr: *const cty::c_void, write_ptr: *mut cty::c_void, @@ -38,6 +42,8 @@ impl UserPtr { } } + /// # Safety + /// `unsafe` pub unsafe fn new_neither() -> Self { Self::Neither } pub fn read_size(&self) -> usize { |