pub trait PackageConsumer: Send + 'static {
type Value: Send + 'static;
// Required methods
fn event(&self) -> &str;
fn accept(&self) -> &[String];
fn neutral(&mut self) -> Option<Self::Value>;
fn consume(
&mut self,
content_type: Option<&[u8]>,
body: &[u8],
) -> Result<Self::Value, PackageRejection>;
// Provided methods
fn event_id(&self) -> Option<&str> { ... }
fn empty_terminal_is_valid(&self) -> bool { ... }
}Expand description
Package-specific parsing behind the generic event lifecycle.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn empty_terminal_is_valid(&self) -> bool
fn empty_terminal_is_valid(&self) -> bool
Whether an empty terminal body is valid without invoking the consumer.