pub trait IntoFlex<const SIZE: usize, const PAD1: usize, const PAD2: usize, HEAP> {
    fn into_flex(self) -> FlexStr<SIZE, PAD1, PAD2, HEAP>;
}
Expand description

A trait that converts the source to a FlexStr while consuming the original

use flexstr::{local_str, LocalStr, IntoFlex};

let a: LocalStr = local_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 while consuming the original

Implementations on Foreign Types

use flexstr::{SharedStr, IntoFlex};

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

Implementors