Trait math_text_transform::MathTextTransform
[−]
[src]
pub trait MathTextTransform<T> { fn to_math_bold(&self) -> T; fn to_math_italic(&self) -> T; fn to_math_bold_italic(&self) -> T; fn to_math_sans_serif(&self) -> T; fn to_math_sans_serif_bold(&self) -> T; fn to_math_sans_serif_italic(&self) -> T; fn to_math_sans_serif_bold_italic(&self) -> T; fn to_math_script(&self) -> T; fn to_math_bold_script(&self) -> T; fn to_math_fraktur(&self) -> T; fn to_math_bold_fraktur(&self) -> T; fn to_math_monospace(&self) -> T; fn to_math_double_struck(&self) -> T; }
Convenience trait that allows you to call the the transformation straight on a string slice. If a variant doesn't exist for a given character, it is left as is.
Examples
use math_text_transform::MathTextTransform; assert_eq!("Italıc f(π)".to_math_italic(), "𝐼𝑡𝑎𝑙𝚤𝑐 𝑓(𝜋)"); assert_eq!("Double-struck 123".to_math_double_struck(), "𝔻𝕠𝕦𝕓𝕝𝕖-𝕤𝕥𝕣𝕦𝕔𝕜 𝟙𝟚𝟛");
Required Methods
fn to_math_bold(&self) -> T
Transform to 𝐛𝐨𝐥𝐝 variant.
fn to_math_italic(&self) -> T
Transform to 𝑖𝑡𝑎𝑙𝑖𝑐 variant.
fn to_math_bold_italic(&self) -> T
Transform to 𝒃𝒐𝒍𝒅 𝒊𝒕𝒂𝒍𝒊𝒄 variant.
fn to_math_sans_serif(&self) -> T
Transform to 𝗌𝖺𝗇𝗌-𝗌𝖾𝗋𝗂𝖿 variant.
fn to_math_sans_serif_bold(&self) -> T
Transform to 𝘀𝗮𝗻𝘀-𝘀𝗲𝗿𝗶𝗳 𝗯𝗼𝗹𝗱 variant.
fn to_math_sans_serif_italic(&self) -> T
Transform to 𝘴𝘢𝘯𝘴-𝘴𝘦𝘳𝘪𝘧 𝘪𝘵𝘢𝘭𝘪𝘤 variant.
fn to_math_sans_serif_bold_italic(&self) -> T
Transform to 𝙨𝙖𝙣𝙨-𝙨𝙚𝙧𝙞𝙛 𝙗𝙤𝙡𝙙 𝙞𝙩𝙖𝙡𝙞𝙘 variant.
fn to_math_script(&self) -> T
Transform to 𝓈𝒸𝓇𝒾𝓅𝓉 variant.
fn to_math_bold_script(&self) -> T
Transform to 𝓫𝓸𝓵𝓭 𝓼𝓬𝓻𝓲𝓹𝓽 variant.
fn to_math_fraktur(&self) -> T
Transform to 𝔣𝔯𝔞𝔨𝔱𝔲𝔯 variant.
fn to_math_bold_fraktur(&self) -> T
Transform to 𝖇𝖔𝖑𝖉 𝖋𝖗𝖆𝖐𝖙𝖚𝖗 variant.
fn to_math_monospace(&self) -> T
Transform to 𝚖𝚘𝚗𝚘𝚜𝚙𝚊𝚌𝚎 variant.
fn to_math_double_struck(&self) -> T
Transform to 𝕕𝕠𝕦𝕓𝕝𝕖-𝕤𝕥𝕣𝕦𝕔𝕜 variant.
Implementors
impl MathTextTransform<String> for str