newick-rs 0.2.0

A library for newick format
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub trait FromNewick: Sized {
    fn leaf(name: String) -> Self;
    fn internal(name: String, children: Vec<Self>) -> Self;

    fn update_length(self, length: Option<f64>) -> Self;
}

pub trait ToNewick {
    type Child: ToNewick;

    fn get_name(&self) -> String;
    fn get_children<'a>(&'a self) -> Vec<&'a Self::Child>;
    fn get_length(&self) -> Option<f64>;
}