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 duplicate 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 Freeze for TitleToken
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