Suppose I have a struct
pub struct Test {
pub participant: Set<AccountId>
}
And I created a new account and inserted to participant using the insert
function, I can get len
of participant using len()
method.
How can I get the address?
pub fn get_address(&self) -> Vec<AccountId> {
self.participient.contains() // can't get data
}
You can do
self.participant.to_vec()