ContentStreamPolicy

Trait ContentStreamPolicy 

Source
pub trait ContentStreamPolicy: Send + Sync {
    // Required methods
    fn check(&mut self, bytes: &[u8]) -> ContentPolicyResult<()>;
    fn finalize(&mut self) -> ContentPolicyResult<()>;
}
Expand description

A trait implemented by content stream policies.

Required Methods§

Source

fn check(&mut self, bytes: &[u8]) -> ContentPolicyResult<()>

Checks the given bytes of the content stream.

The bytes represent the next chunk of data received for the content stream.

Source

fn finalize(&mut self) -> ContentPolicyResult<()>

Called when the content stream has finished.

This method is called after all bytes have been received for the content stream.

Implementors§