1 2 3 4 5 6 7 8 9 10 11 12
use std::fmt::Display; #[derive(Debug, Copy, Clone)] /// Logger struct used for Display in the ligen crates pub struct Logger {} impl Logger { /// log function for the Logger struct pub fn log<D: Display>(d: D) { println!("{}", d); } }