Trait flexstr::IntoFlexStr
source · [−]pub trait IntoFlexStr {
fn into_flex_str(self) -> FlexStr;
}Expand description
A trait that converts the source to a FlexStr while consuming the original
use flexstr::flex_str;
let a = flex_str!("This is a wrapped static string literal no matter how long it is!!!!!");
assert!(a.is_static());Required methods
fn into_flex_str(self) -> FlexStr
fn into_flex_str(self) -> FlexStr
Converts the source to a FlexStr while consuming the original
Implementations on Foreign Types
sourceimpl IntoFlexStr for String
impl IntoFlexStr for String
sourcefn into_flex_str(self) -> FlexStr
fn into_flex_str(self) -> FlexStr
use flexstr::IntoFlexStr;
let a = "This is a heap allocated string since it is a `String`".to_string().into_flex_str();
assert!(a.is_heap());