Dependencies

We need the following types for the implementation of a worker:

use actix::System;
use failure::{format_err, Error};
use image::GenericImageView;
use log::debug;
use queens_rock::Scanner;
use rabbit_actix::queue_actor::{QueueActor, QueueHandler, TaskId};
use rabbit_actix::{QrRequest, QrResponse, REQUESTS, RESPONSES};

We imported all the necessary types earlier in this chapter. We also imported two types for decoding QR images. GenericImageView provides the to_luma method to convert an image into grayscale. The Scanner method is a decoder of QR codes provided as grayscale images.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.227.82