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§
Sourcefn into_option_string(self) -> Option<String>
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".