docs(rust): make rustdoc reflect new trait names
@@ -6,6 +6,11 @@ use alloc::string::String;
use core::cell::RefCell;
use ockam_message::message::{Message};
+/// ProcessMessage trait is for workers to process messages addressed to them
+///
+/// A worker registers its address along with a ProcessMessage trait. The WorkerManager
+/// will then call the ProcessMessage trait when the next onward_route address is that of
+/// the worker.
pub trait ProcessMessage {
fn handle_message(
&mut self,
@@ -24,9 +29,9 @@ pub trait Poll { //todo - add context
}
pub type PollHandle = Rc<RefCell<dyn Poll>>;
-/// Enqueue trait is used by Workers to enqueue messages for routing.
+/// RouteMessage trait is used by Workers to enqueue messages for routing.
///
-/// The Enqueue trait is passed to a Worker each time it is sent a message or polled.
+/// The RouteMessage trait is passed to a Worker each time it is sent a message or polled.
pub trait RouteMessage<T> {
fn route_message(&mut self, t: T) -> Result<bool, String>;
}
