Skip to main content

OptionStringExt

Trait OptionStringExt 

Source
pub(crate) trait OptionStringExt: Sized {
    // Required method
    fn clean_string(&mut self);

    // Provided method
    fn into_clean_string(self) -> Self { ... }
}
Expand description

Extensions to Option<String>.

Required Methods§

Source

fn clean_string(&mut self)

Remove unnecessary or problematic characters from the string.

If the final string is empty, replaces it with None.

Provided Methods§

Source

fn into_clean_string(self) -> Self

Remove unnecessary or problematic characters from the string.

If the final string is empty, replaces it with None.

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 OptionStringExt for Option<String>

Source§

fn clean_string(&mut self)

Implementors§