Contack

Contack is a contact library for rust. Rather than following the RFCs exactly, it gives up some compatibility for ease of use. For example, instead of being able to express any number of job roles, Contack gives you the option of only 1, which intern is much easier to work with.
With the read_write feature you can have native support for serialisation and deserialisation, to VCard. This is achieved as follows:
use contack::Contact;
use contack::read_write::vcard::VCard;
use std::fs::File;
use std::io::prelude::*;
use std::convert::TryInto;
fn main() -> Result<(), Box<dyn Error>> {
let vcard = String::new();
File::open("my_card.vcard")?.read_to_string(&mut vcard)?;
let vcard: VCard = vcard.parse()?;
let contact: Contact = vcard.try_into()?;
contact.role = Some("Being a handy example.");
let vcard: VCard = vcard.into();
println!("{}", vcard.to_string());
}
It also supports the following external libraries:
- VCard
vcard. Note this only support serialisation, and is a stricter alternative to the inbuilt read_write
- Diesel
diesel_support. This supports both serialisation and deserialisation.
- Sqlx
sqlx_support. This supports both serialisation and deserialisation.