Skip to main content

IntoOptionalGStr

Trait IntoOptionalGStr 

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

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

Required Methods§

Source

fn run_with_gstr<T, F: FnOnce(Option<&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<S: IntoGStr> IntoOptionalGStr for Option<S>

Source§

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

Implementors§