pub struct Archive { /* private fields */ }Expand description
Archive for reading/writing AGC data
Implementations§
Source§impl Archive
impl Archive
Sourcepub fn new_reader() -> Self
pub fn new_reader() -> Self
Create a new archive in input (read) mode
Sourcepub fn new_writer() -> Self
pub fn new_writer() -> Self
Create a new archive in output (write) mode
Sourcepub fn register_stream(&mut self, stream_name: &str) -> usize
pub fn register_stream(&mut self, stream_name: &str) -> usize
Register a new stream and return its ID
Sourcepub fn get_stream_id(&self, stream_name: &str) -> Option<usize>
pub fn get_stream_id(&self, stream_name: &str) -> Option<usize>
Get stream ID by name (returns None if not found)
Sourcepub fn get_stream_names(&self) -> Vec<String>
pub fn get_stream_names(&self) -> Vec<String>
Get list of all stream names
Sourcepub fn add_part(
&mut self,
stream_id: usize,
data: &[u8],
metadata: u64,
) -> Result<()>
pub fn add_part( &mut self, stream_id: usize, data: &[u8], metadata: u64, ) -> Result<()>
Add a part to a stream
Sourcepub fn set_raw_size(&mut self, stream_id: usize, raw_size: u64)
pub fn set_raw_size(&mut self, stream_id: usize, raw_size: u64)
Set raw (uncompressed) size for a stream
Sourcepub fn get_raw_size(&self, stream_id: usize) -> u64
pub fn get_raw_size(&self, stream_id: usize) -> u64
Get raw size for a stream
Sourcepub fn get_num_streams(&self) -> usize
pub fn get_num_streams(&self) -> usize
Get number of streams
Sourcepub fn get_num_parts(&self, stream_id: usize) -> usize
pub fn get_num_parts(&self, stream_id: usize) -> usize
Get number of parts in a stream
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Archive
impl RefUnwindSafe for Archive
impl Send for Archive
impl Sync for Archive
impl Unpin for Archive
impl UnwindSafe for Archive
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more