eureka-mmanager 0.3.2

An Actix actor collection for downloading manga, chapters, covers from Mangadex
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use actix::prelude::*;
use mangadex_api::MangaDexClient;

use crate::download::state::DownloadManagerState;

#[derive(Debug, Clone, Copy, Default)]
pub struct GetClientMessage;

impl Message for GetClientMessage {
    type Result = MangaDexClient;
}

impl Handler<GetClientMessage> for DownloadManagerState {
    type Result = <GetClientMessage as Message>::Result;
    fn handle(&mut self, _msg: GetClientMessage, _ctx: &mut Self::Context) -> Self::Result {
        self.client.clone()
    }
}