Trait hedwig::publish::EncodableMessage [−][src]
pub trait EncodableMessage {
type Error: Error + Send + Sync + 'static;
type Validator;
fn topic(&self) -> Topic;
fn encode(
self,
validator: &Self::Validator
) -> Result<ValidatedMessage, Self::Error>;
}
This is supported on crate feature
publish
only.Expand description
Types that can be encoded and published.
Associated Types
The errors that can occur when calling the EncodableMessage::encode
method.
Will typically match the errors returned by the EncodableMessage::Validator
.