Trait literalext::LiteralExt [] [src]

pub trait LiteralExt {
    fn parse_int(&self) -> Option<IntLit>;
fn parse_float(&self) -> Option<FloatLit>;
fn parse_string(&self) -> Option<String>;
fn parse_char(&self) -> Option<char>;
fn parse_bytes(&self) -> Option<Vec<u8>>;
fn parse_byte(&self) -> Option<u8>;
fn parse_inner_doc(&self) -> Option<String>;
fn parse_outer_doc(&self) -> Option<String>; }

Required Methods

If the Literal is an integer literal, returns its value.

If the Literal is a floating point literal, returns its value.

If the Literal is a string literal, returns it's value.

If the Literal is a char literal, returns it's value.

If the Literal is a byte string literal, returns it's value.

If the Literal is a byte literal, returns it's value.

If the Literal is an inner doc comment (//! or /*!), returns a string with the text of the comment.

If the Literal is an outer doc comment (/// or /**), returns a string with the text of the comment.

Implementors