Struct plantuml_parser::TitleToken
source · pub struct TitleToken { /* private fields */ }
Expand description
A token sequence that is around the title keyword. (like "title EXAMPLE TITLE"
.)
Examples
use plantuml_parser::{TitleToken, ParseContainer};
let input = "title EXAMPLE TITLE "; /// The last " " is rest parts
let (rest, (raws, token)) = TitleToken::parse(input.into())?;
let combined_raw: ParseContainer = raws.into();
assert_eq!(rest, " ");
assert_eq!(combined_raw, "title EXAMPLE TITLE");
assert_eq!(token.title(), "EXAMPLE TITLE");
Implementations§
source§impl TitleToken
impl TitleToken
sourcepub fn parse(input: ParseContainer) -> ParseResult<Self>
pub fn parse(input: ParseContainer) -> ParseResult<Self>
Tries to parse TitleToken
. (e.g. "title EXAMPLE TITLE"
.)
Trait Implementations§
source§impl Clone for TitleToken
impl Clone for TitleToken
source§fn clone(&self) -> TitleToken
fn clone(&self) -> TitleToken
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for TitleToken
impl Send for TitleToken
impl Sync for TitleToken
impl Unpin for TitleToken
impl UnwindSafe for TitleToken
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more