pub trait IntoFlex<const N: usize, T> {
    fn into_flex(self) -> Flex<N, T>;
}
Expand description

A trait that converts the source to a FlexStr<N, T> while consuming the original

use flexstr::{flex_str, FlexStr, IntoFlex};

let a: FlexStr = flex_str!("This is a wrapped static string literal no matter how long it is!!!!!");
assert!(a.is_static());

Required methods

Converts the source to a FlexStr<N, T> while consuming the original

Implementations on Foreign Types

use flexstr::{AFlexStr, IntoFlex};

let a = "Inlined!".to_string();
let b: AFlexStr = a.clone().into_flex();
assert!(b.is_inlined());
assert_eq!(b, a);

Implementors