We need a struct without any fields, because we'll use it with SyncArbiter, which runs multiple actors in multiple threads. Add the ResizeActor struct:
pub struct ResizeActor;
impl Actor for ResizeActor {
type Context = SyncContext<Self>;
}
We don't need a special constructor and we implemented the Actor trait with the SyncContext type for the associate Context type. We'll use this context type to make this actor suitable for the synchronous environment of SyncArbiter.