In many places the api accepts only String pr obly &str when it is easy tow rite a function which takes both. https://hermanradtke.com/2015/05/06/creating-a-rust-function-that-accepts-string-or-str.html/