pub fn add_key(&mut self, key: AccountHash, weight: Weight) -> Result<(), AddKeyFailure> {
        match self.0.entry(key) {
            Entry::Vacant(entry) => {
                entry.insert(weight);
            }
            Entry::Occupied(_) => return Err(AddKeyFailure::DuplicateKey),
        }
        Ok(())
    }
/// Adds new AssociatedKey to the set.
/// Returns true if added successfully, false otherwise.
Adds new AssociatedKey to the set.
Returns true if added successfully, false otherwise.
Adds new AssociatedKey to the set . Returns true if added successfully false otherwise .
pub fn add_key(&mut self, key: AccountHash, weight: Weight) -> Result<(), AddKeyFailure> {
        match self.0.entry(key) {
            Entry::Vacant(entry) => {
                entry.insert(weight);
            }
            Entry::Occupied(_) => return Err(AddKeyFailure::DuplicateKey),
        }
        Ok(())
    }
pub fn add_key ( & mut self , key : AccountHash , weight : Weight ) -> Result < ( ) , AddKeyFailure > { match self . 0 . entry ( key ) { Entry :: Vacant ( entry ) => { entry . insert ( weight ) ; } Entry :: Occupied ( _ ) => return Err ( AddKeyFailure :: DuplicateKey ) , } Ok ( ( ) ) }
Adds new AssociatedKey to the set.
Adds new AssociatedKey to the set .
&mut self
key
AccountHash
weight
Weight
&mut self
key
AccountHash
weight
Weight