mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-19 22:20:37 +00:00
Add ftruncate method to Handle struct in tokio_epoll_uring_ext.rs
Co-Authored-By: christian@neon.tech <christian@neon.tech>
This commit is contained in:
@@ -198,3 +198,13 @@ impl std::ops::Deref for Handle {
|
||||
.expect("must be already initialized when using this")
|
||||
}
|
||||
}
|
||||
|
||||
impl Handle {
|
||||
pub async fn ftruncate<F: tokio_epoll_uring::IoFd + Send>(
|
||||
&self,
|
||||
file: F,
|
||||
len: u64,
|
||||
) -> (F, Result<(), tokio_epoll_uring::Error<std::io::Error>>) {
|
||||
self.deref().ftruncate(file, len).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user