feat: start of archive generation for new manager

This commit is contained in:
Jef Roosens 2024-05-23 21:09:35 +02:00
parent cc2dc9b28f
commit 2e0c6d1fa6
Signed by: Jef Roosens
GPG key ID: 02D4C0997E74717B
7 changed files with 90 additions and 22 deletions

View file

@ -11,6 +11,8 @@ pub struct Builder {
consumed: bool,
}
unsafe impl Send for Builder {}
impl Builder {
pub fn new() -> Self {
Builder::default()

View file

@ -13,6 +13,8 @@ pub struct FileWriter {
closed: bool,
}
unsafe impl Send for FileWriter {}
impl Handle for FileWriter {
unsafe fn handle(&self) -> *const ffi::Struct_archive {
self.handle as *const _

View file

@ -9,6 +9,8 @@ pub struct WriteEntry {
entry: *mut ffi::Struct_archive_entry,
}
unsafe impl Send for WriteEntry {}
impl WriteEntry {
pub fn new() -> Self {
let entry = unsafe { ffi::archive_entry_new() };