Trait IntoGStr

pub trait IntoGStr {
    // Required method
    fn run_with_gstr<T, F>(self, f: F) -> T
       where F: FnOnce(&GStr) -> T;
}
Expand description

A trait to accept both &str or &GStr as an argument.

Required Methods§

fn run_with_gstr<T, F>(self, f: F) -> T
where F: FnOnce(&GStr) -> T,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl IntoGStr for &str

§

fn run_with_gstr<T, F>(self, f: F) -> T
where F: FnOnce(&GStr) -> T,

§

impl IntoGStr for &String

§

fn run_with_gstr<T, F>(self, f: F) -> T
where F: FnOnce(&GStr) -> T,

§

impl IntoGStr for String

§

fn run_with_gstr<T, F>(self, f: F) -> T
where F: FnOnce(&GStr) -> T,

Implementors§

§

impl IntoGStr for &GStr

§

impl IntoGStr for &GString

§

impl IntoGStr for GString