Trait BBCode

Source
pub trait BBCode {
    // Required method
    fn as_html(&self) -> String;
}
Expand description

BBCode is a trait that will convert the input BBCode into HTML

Included in this is a default ipml for &str, allowing you to

use bbcode::BBCode;

assert_eq!("[b]Bold![/b]".as_html(), "<strong>Bold!</strong>");

Required Methods§

Source

fn as_html(&self) -> String

Implementations on Foreign Types§

Source§

impl<'a> BBCode for &'a str

Source§

fn as_html(&self) -> String

Implementors§