Struct plantuml_parser::EndLine
source · 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
Trait Implementations§
Auto Trait Implementations§
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