[−][src]Struct ress::tokens::Comment
A comment, effectively should be treated as white space. There are 3 kinds of comments according to the specification.
- Single line comments: //comment
- Multi line comments: /* comment */
- HTML comments: plus more!
Fields
kind: CommentKind
content: T
tail_content: Option<T>
Trait Implementations
impl<'a> CommentExt<&'a str> for Comment<&'a str>
[src]
fn from_parts(
content: &'a str,
kind: CommentKind,
tail_content: Option<&'a str>
) -> Self
[src]
content: &'a str,
kind: CommentKind,
tail_content: Option<&'a str>
) -> Self
fn new_single_line(content: &'a str) -> Self
[src]
fn new_multi_line(content: &'a str) -> Self
[src]
fn new_html(content: &'a str, tail_content: Option<&'a str>) -> Self
[src]
fn new_html_no_tail(content: &'a str) -> Self
[src]
fn new_html_with_tail(content: &'a str, tail: &'a str) -> Self
[src]
fn new_hashbang(content: &'a str) -> Self
[src]
fn is_multi_line(&self) -> bool
[src]
fn is_single_line(&self) -> bool
[src]
fn is_html(&self) -> bool
[src]
fn is_hashbang(&self) -> bool
[src]
impl CommentExt<String> for Comment<String>
[src]
fn from_parts(
content: String,
kind: CommentKind,
tail_content: Option<String>
) -> Self
[src]
content: String,
kind: CommentKind,
tail_content: Option<String>
) -> Self
fn new_single_line(content: String) -> Self
[src]
fn new_multi_line(content: String) -> Self
[src]
fn new_html(content: String, tail_content: Option<String>) -> Self
[src]
fn new_html_no_tail(content: String) -> Self
[src]
fn new_html_with_tail(content: String, tail: String) -> Self
[src]
fn new_hashbang(content: String) -> Self
[src]
fn is_multi_line(&self) -> bool
[src]
fn is_single_line(&self) -> bool
[src]
fn is_html(&self) -> bool
[src]
fn is_hashbang(&self) -> bool
[src]
impl<T: Clone> Clone for Comment<T>
[src]
impl<T: PartialEq> PartialEq<Comment<T>> for Comment<T>
[src]
impl ToString for Comment<String>
[src]
impl<'_> ToString for Comment<&'_ str>
[src]
impl<T: Debug> Debug for Comment<T>
[src]
impl<T> StructuralPartialEq for Comment<T>
[src]
Auto Trait Implementations
impl<T> Send for Comment<T> where
T: Send,
T: Send,
impl<T> Sync for Comment<T> where
T: Sync,
T: Sync,
impl<T> Unpin for Comment<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for Comment<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for Comment<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,