Skip to main content

IntoOptionString

Trait IntoOptionString 

Source
pub trait IntoOptionString: Sealed {
    // Required method
    fn into_option_string(self) -> Option<String>;
}
Expand description

What a builder takes for an optional text field: "de-DE", a String, or an Option of either (None clears the field). impl Into<Option<String>> would refuse a plain &str, so the builders take this instead.

The trait is sealed: Bilingua implements it for &str, String, &String and their Options, and may add more types in a 1.x release; other crates cannot implement it.

Required Methods§

Source

fn into_option_string(self) -> Option<String>

The value as an optional String.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl IntoOptionString for &String

Source§

impl IntoOptionString for &str

Source§

impl IntoOptionString for Option<&String>

Source§

impl IntoOptionString for Option<&str>

Source§

impl IntoOptionString for Option<String>

Source§

impl IntoOptionString for String

Implementors§