pub trait MaybeString<'c>where
    Self: From<String> + From<&'c str> + TryInto<String, Error = DatumConversionFailure<Self>>,{
    // Required method
    fn try_as_str(&self) -> Result<&str, TypeMismatch>;

    // Provided method
    fn try_into_string(self) -> Result<String, TypeMismatch> { ... }
}
Expand description

Types that can be an UTF-8 text string

Required Methods§

source

fn try_as_str(&self) -> Result<&str, TypeMismatch>

Try to interpret datum as Unicode string

Provided Methods§

source

fn try_into_string(self) -> Result<String, TypeMismatch>

Try to convert datum into Unicode string

Implementors§