Struct plantuml_parser::HeaderLine
source · pub struct HeaderLine { /* private fields */ }
Expand description
A token sequence that is a line containing a HeaderToken
. (like "\theader EXAMPLE HEADER \n"
.)
Examples
use plantuml_parser::{HeaderLine, ParseContainer};
let input = " header EXAMPLE HEADER\n";
let (rest, (raws, token)) = HeaderLine::parse(input.into())?;
let combined_raw: ParseContainer = raws.into();
assert_eq!(rest, "");
assert_eq!(combined_raw, " header EXAMPLE HEADER\n");
assert_eq!(token.header(), "EXAMPLE HEADER");
Implementations§
source§impl HeaderLine
impl HeaderLine
sourcepub fn parse(input: ParseContainer) -> ParseResult<Self>
pub fn parse(input: ParseContainer) -> ParseResult<Self>
Tries to parse HeaderLine
. (e.g. " header EXAMPLE HEADER\n"
.)
Methods from Deref<Target = HeaderToken>§
Trait Implementations§
source§impl Clone for HeaderLine
impl Clone for HeaderLine
source§fn clone(&self) -> HeaderLine
fn clone(&self) -> HeaderLine
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 moresource§impl Debug for HeaderLine
impl Debug for HeaderLine
Auto Trait Implementations§
impl RefUnwindSafe for HeaderLine
impl Send for HeaderLine
impl Sync for HeaderLine
impl Unpin for HeaderLine
impl UnwindSafe for HeaderLine
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