Skip to main content

IntoGStr

Trait IntoGStr 

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

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

Required Methods§

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoGStr for &str

Source§

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

Source§

impl IntoGStr for &String

Source§

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

Source§

impl IntoGStr for String

Source§

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

Implementors§