Skip to main content

pamoja_updater_write

Function pamoja_updater_write 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn pamoja_updater_write( updater: *mut PamojaUpdater, chunk: *const u8, len: usize, ) -> PamojaStatus
Expand description

Takes the next piece of an image opened with pamoja_updater_begin.

§Arguments

  • updater - the updater.
  • chunk - the next bytes of the image, in order.
  • len - the length of chunk.

§Returns

PamojaStatus::Ok once the chunk is stored and its progress recorded.

§Safety

updater must be a live handle from pamoja_updater_new, and chunk must point to at least len readable bytes, or be null when len is 0.