diff options
| author | Fuwn <[email protected]> | 2022-01-03 12:58:55 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-01-03 12:58:55 -0800 |
| commit | c1109b4a5694d7a9b8b93c11140ce968bf074816 (patch) | |
| tree | fe8ef37bc60d37dbcb5e41a1b29c5d4dcc39f100 /crates/windows-kernel-rs/src/user_ptr.rs | |
| parent | fix(windows-kernal-build): fix unnecessary lazy evaluation (diff) | |
| download | driver-c1109b4a5694d7a9b8b93c11140ce968bf074816.tar.xz driver-c1109b4a5694d7a9b8b93c11140ce968bf074816.zip | |
fix(window-kernel-rs): mark unsafe functions
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 { |