[−][src]Enum rtf_grimoire::tokenizer::Token
Variants
ControlSymbol(char)
ControlWord
Fields of ControlWord
ControlBin(Vec<u8>)
Text(Vec<u8>)
Text is not str because it can be in any of various encodings - it's up to the processor to identify any encoding information in the stream, and do any encoding conversion desired
StartGroup
EndGroup
Newline
Methods
impl Token
[src]
pub fn to_rtf(&self) -> Vec<u8>
[src]
pub fn token_delimiter_after(&self, next_token: &Token) -> &'static str
[src]
This function returns a control word delimiter if one is required, or an empty string if none is required
Control Word tokens must be delimited by a non-alphanumeric value, so if the subsequent content could be alphanumeric, a space (' ') delimiter must be inserted
pub fn token_delimiter_before(&self, prev_token: &Token) -> &'static str
[src]
This function returns a control word delimiter if one is required, or an empty string if none is required
Control Word tokens must be delimited by a non-alphanumeric value, so if the subsequent content could be alphanumeric, a space (' ') delimiter must be inserted
pub fn get_name(&self) -> Option<String>
[src]
pub fn get_arg(&self) -> Option<i32>
[src]
pub fn get_symbol(&self) -> Option<char>
[src]
pub fn get_bin(&self) -> Option<&[u8]>
[src]
pub fn get_text(&self) -> Option<&[u8]>
[src]
Trait Implementations
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = !
try_from
)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> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,