pub struct EndLine { /* private fields */ }
Expand description
A token sequence that is a line containing a end keyword ("@endXYX"
). (like "@enduml\n"
.)
§Examples
use plantuml_parser::{EndLine, ParseContainer};
let input = " @enduml \n";
let (rest, (raws, token)) = EndLine::parse(input.into())?;
let combined_raw: ParseContainer = raws.into();
assert_eq!(rest, "");
assert_eq!(combined_raw, " @enduml \n");
assert!(token.eq_diagram_kind("uml"));
Implementations§
Source§impl EndLine
impl EndLine
Sourcepub fn parse(input: ParseContainer) -> ParseResult<Self>
pub fn parse(input: ParseContainer) -> ParseResult<Self>
Tries to parse EndLine
. (e.g. " @enduml\n"
.)
pub fn eq_diagram_kind(&self, diagram_kind: &str) -> bool
pub fn inline_block_comment(&self) -> Option<&InlineBlockCommentToken>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EndLine
impl RefUnwindSafe for EndLine
impl Send for EndLine
impl Sync for EndLine
impl Unpin for EndLine
impl UnwindSafe for EndLine
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