summaryrefslogtreecommitdiff
path: root/crates/windows-kernel-rs/src/user_ptr.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-01-03 12:58:55 -0800
committerFuwn <[email protected]>2022-01-03 12:58:55 -0800
commitc1109b4a5694d7a9b8b93c11140ce968bf074816 (patch)
treefe8ef37bc60d37dbcb5e41a1b29c5d4dcc39f100 /crates/windows-kernel-rs/src/user_ptr.rs
parentfix(windows-kernal-build): fix unnecessary lazy evaluation (diff)
downloaddriver-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.rs6
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 {