hello_lib/
lib.rs

1use std::fmt::Display;
2use std::fmt::Debug;
3
4/// Function hello accepts an argument and returns Hello <argument> !.
5/// It accepts any scalar datatype (i,u,&str,String,bool) and returns a String object.
6/// This is a simple implementation to demonstrate Generics Function.
7/// 
8pub fn hello<T:Display + Debug>(s: T) -> String {
9    format!("Hello {} !", s.to_string() )
10}