convert_to_ref/
convert_to_ref.rs

1use tmflib::tmf620::catalog::Catalog;
2/// Example to show use of trait HasReference to convert a value to a reference.
3use tmflib::tmf620::category::Category;
4#[cfg(feature = "build-V4")]
5use tmflib::tmf632::individual_v4::Individual;
6#[cfg(feature = "build-V5")]
7use tmflib::tmf632::individual_v5::Individual;
8use tmflib::HasReference;
9
10fn main() {
11    // Create a value of type i32
12    let cat = Category::new("Example Category");
13    let catalog = Catalog::new("Example Catalog");
14    let individual = Individual::new("Example Individual");
15
16    let cat_ref = cat.as_ref();
17    let catalog_ref = catalog.as_ref();
18    let individual_ref = individual.as_ref();
19
20    dbg!(cat_ref);
21    dbg!(catalog_ref);
22    dbg!(individual_ref);
23}