January 2019
Intermediate to advanced
520 pages
14h 32m
English
Handler of the Log messages is quite simple. We call the info method of Logger with a provided message and ignore errors with by converting a Result into an Option:
impl Handler<Log> for LogActor { type Result = (); fn handle(&mut self, Log(mesg): Log, _: &mut Context<Self>) -> Self::Result { self.writer.info(mesg).ok(); } }
The last actor we have to implement is the resizing actor.
Read now
Unlock full access