@@ -45,25 +45,24 @@ pub mod utils;
4545/// defines all items in an event based envelope to relate to the envelope.
4646pub trait Processor {
4747 /// A unit of work, the processor can process.
48- type UnitOfWork : Counted ;
49- /// The result after processing a [`Self::UnitOfWork `].
48+ type Input : Counted ;
49+ /// The result after processing a [`Self::Input `].
5050 type Output : Forward ;
5151 /// The error returned by [`Self::process`].
5252 type Error : std:: error:: Error + ' static ;
5353
54- /// Extracts a [`Self::UnitOfWork `] from a [`ManagedEnvelope`].
54+ /// Extracts a [`Self::Input `] from a [`ManagedEnvelope`].
5555 ///
5656 /// This is infallible, if a processor wants to report an error,
57- /// it should return a [`Self::UnitOfWork `] which later, can produce an error when being processed.
57+ /// it should return a [`Self::Input `] which later, can produce an error when being processed.
5858 ///
5959 /// Returns `None` if nothing in the envelope concerns this processor.
60- fn prepare_envelope ( & self , envelope : & mut ManagedEnvelope )
61- -> Option < Managed < Self :: UnitOfWork > > ;
60+ fn prepare_envelope ( & self , envelope : & mut ManagedEnvelope ) -> Option < Managed < Self :: Input > > ;
6261
63- /// Processes a [`Self::UnitOfWork `].
62+ /// Processes a [`Self::Input `].
6463 async fn process (
6564 & self ,
66- work : Managed < Self :: UnitOfWork > ,
65+ work : Managed < Self :: Input > ,
6766 ctx : Context < ' _ > ,
6867 ) -> Result < Output < Self :: Output > , Rejected < Self :: Error > > ;
6968}
0 commit comments