[][src]Trait ress::tokens::CommentExt

pub trait CommentExt<T> {
    fn from_parts(
        content: T,
        kind: CommentKind,
        tail_content: Option<T>
    ) -> Comment<T>;
fn new_single_line(content: T) -> Comment<T>;
fn new_multi_line(content: T) -> Comment<T>;
fn new_html(content: T, tail_content: Option<T>) -> Comment<T>;
fn new_html_no_tail(content: T) -> Comment<T>;
fn new_html_with_tail(content: T, tail: T) -> Comment<T>;
fn new_hashbang(content: T) -> Comment<T>;
fn is_multi_line(&self) -> bool;
fn is_single_line(&self) -> bool;
fn is_html(&self) -> bool;
fn is_hashbang(&self) -> bool; }

Extension methods for comment to work with both &str and String

Required methods

fn from_parts(
    content: T,
    kind: CommentKind,
    tail_content: Option<T>
) -> Comment<T>

fn new_single_line(content: T) -> Comment<T>

fn new_multi_line(content: T) -> Comment<T>

fn new_html(content: T, tail_content: Option<T>) -> Comment<T>

fn new_html_no_tail(content: T) -> Comment<T>

fn new_html_with_tail(content: T, tail: T) -> Comment<T>

fn new_hashbang(content: T) -> Comment<T>

fn is_multi_line(&self) -> bool

fn is_single_line(&self) -> bool

fn is_html(&self) -> bool

fn is_hashbang(&self) -> bool

Loading content...

Implementors

impl CommentExt<String> for Comment<String>[src]

impl<'a> CommentExt<&'a str> for Comment<&'a str>[src]

Loading content...