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

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

Types that can be an UTF-8 text string

Required Methods§

source

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

Try to interpret datum as Unicode string

Provided Methods§

source

fn try_into_string(self) -> Result<String, DatumConversionError<Self>>

Try to convert datum into Unicode string

Implementors§