pub type Fragment<'a> = Cow<'a, str>;
Expand description
A fragment of Text
.
This is just an alias to a string that may be either borrowed or owned.
Aliased Type§
enum Fragment<'a> {
Borrowed(&'a str),
Owned(String),
}
Variants§
Trait Implementations§
source§impl<'a, 'b> IntoFragment<'a> for &'a Fragment<'b>
impl<'a, 'b> IntoFragment<'a> for &'a Fragment<'b>
source§fn into_fragment(self) -> Fragment<'a>
fn into_fragment(self) -> Fragment<'a>
Converts the value to some text
Fragment
.source§impl<'a> IntoFragment<'a> for Fragment<'a>
impl<'a> IntoFragment<'a> for Fragment<'a>
source§fn into_fragment(self) -> Fragment<'a>
fn into_fragment(self) -> Fragment<'a>
Converts the value to some text
Fragment
.