1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/// This effect can be the result of a set options operation and represents
/// the fact that a new signer has been removed from an account.
#[derive(Debug, Deserialize, Clone)]
pub struct Removed {
    account: String,
    public_key: String,
    weight: u8,
}

impl Removed {
    /// Removes a Signer
    pub fn new(account: String, public_key: String, weight: u8) -> Removed {
        Removed {
            account,
            public_key,
            weight,
        }
    }

    /// The public address of the account that lost a new signer
    pub fn account(&self) -> &String {
        &self.account
    }

    /// The public key of the old signer
    pub fn public_key(&self) -> &String {
        &self.public_key
    }

    /// The new weight of the signer.  Should be 0
    pub fn weight(&self) -> u8 {
        self.weight
    }
}