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§
Sourcefn check(&mut self, bytes: &[u8]) -> ContentPolicyResult<()>
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.
Sourcefn finalize(&mut self) -> ContentPolicyResult<()>
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.