Add guarantee for ZipStreamVisitor::visit_additional_metadata

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-07-22 18:58:56 +10:00 committed by Marli Frost
parent 8f7c43c227
commit d858994e1e

View file

@ -116,6 +116,8 @@ pub trait ZipStreamVisitor {
fn visit_file(&mut self, file: &mut ZipFile<'_>) -> ZipResult<()>;
/// This function is guranteed to be called after all `visit_file`s.
/// For every file, there must be corresponding visit_additional_metadata
/// unless the input is incomplete.
///
/// * `metadata` - Provides missing metadata in `visit_file`.
fn visit_additional_metadata(&mut self, metadata: &ZipStreamFileMetadata) -> ZipResult<()>;