Build

Trait Build 

Source
pub trait Build<T> {
    // Required method
    fn build(self) -> T;
}

Required Methods§

Source

fn build(self) -> T

Implementors§

Source§

impl<T, U> Build<U> for T
where T: Into<U>,

To allow submitting T where Build<T> is expected.

This is used across the builders.

§Example

use phenopacket_builder::Build;

fn takes_build_val(val: impl Build<u8>) -> u8 {
    val.build()
}

assert_eq!(takes_build_val(123), 123);