Contack is a simple library for managing contacts in rust.
Contack-vCard allows simple exporting to the vcard format.
Here is an example
fn main() {
let mut contact = contack::Contact::new (
contack::name::Name {
given : Some("John"),
additional : None,
family : Some("Toohey"),
prefixes : None,
suffixes : None,
}
);
contact.contact_information.push (
contack::contact_information::ContactInformation::new (
"john_t@mailo.com",
Email
)
);
let vcontact = contack_vcard::contack_to_vcard (
contact
);
println!("{}", vcontact);
}
contack_to_vcard | Converts a Contack Contact to a VCard, which can later be written to a file.
|