1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
///captcha
pub struct Captcha {
    raw_data: Vec<u8>,
    ///the text of this captcha
    pub phrase: String,
}

impl Captcha {
    ///construct
    pub fn new(raw_data: Vec<u8>, phrase: String) -> Self {
        Self { raw_data, phrase }
    }
    ///image binary data
    pub fn data(&self) -> &[u8] {
        &self.raw_data
    }
}