Struct rusty_santa::Group
[−]
[src]
pub struct Group { /* fields omitted */ }
A group of people that wants to draw names.
Methods
impl Group
[src]
fn new() -> Self
[src]
Create a new Group
.
fn add(&mut self, name: String)
[src]
Add a name to the group.
fn exclude(&mut self, from: String, to: String)
[src]
Make sure that person A does not have to give person B a gift.
fn exclude_pair(&mut self, a: String, b: String)
[src]
Make sure that person A and B don't have to give each other gifts.
fn contains_name(&self, name: &str) -> bool
[src]
Return whether the specified name is alread in the group.
fn assign(&self) -> Result<Vec<(String, String)>, AssignError>
[src]
Run the name assignment!