pub struct FarcWriter { /* private fields */ }
Expand description
Represent the content to be written to a FARC file. IT can only create hash-indexed file.
Implementations§
Source§impl FarcWriter
impl FarcWriter
Sourcepub fn new_from_farc<FT: Read + Seek>(
farc: &Farc<FT>,
) -> Result<Self, FarcWriterError>
pub fn new_from_farc<FT: Read + Seek>( farc: &Farc<FT>, ) -> Result<Self, FarcWriterError>
Create a new FarcWriter
from an extracted Farc
file
Sourcepub fn add_hashed_file(&mut self, hash: u32, content: Vec<u8>)
pub fn add_hashed_file(&mut self, hash: u32, content: Vec<u8>)
Add a file to be written with the given hash (as definied in the [hash_name
] documentation)
Sourcepub fn write_hashed<T: Write + Seek>(
&self,
file: &mut T,
) -> Result<(), FarcWriterError>
pub fn write_hashed<T: Write + Seek>( &self, file: &mut T, ) -> Result<(), FarcWriterError>
Write an hashed Farc file to the given writer, with the content of this struct
Trait Implementations§
Source§impl Debug for FarcWriter
impl Debug for FarcWriter
Source§impl Default for FarcWriter
impl Default for FarcWriter
Source§fn default() -> FarcWriter
fn default() -> FarcWriter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FarcWriter
impl RefUnwindSafe for FarcWriter
impl Send for FarcWriter
impl Sync for FarcWriter
impl Unpin for FarcWriter
impl UnwindSafe for FarcWriter
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