glib

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", so this trait is not object safe.

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§