[][src]Trait sfv::ParseMore

pub trait ParseMore {
    fn parse_more(&mut self, input_bytes: &[u8]) -> Result<(), &'static str>
    where
        Self: Sized
; }

If structured field value of List or Dictionary type is split into multiple lines, allows to parse more lines and merge them into already existing structure field value.

Required methods

fn parse_more(&mut self, input_bytes: &[u8]) -> Result<(), &'static str> where
    Self: Sized

If structured field value is split across lines, parses and merges next line into a single structured field value.

Examples


let mut list_field = Parser::parse_list("11, (12 13)".as_bytes()).unwrap();
list_field.parse_more("\"foo\",        \"bar\"".as_bytes()).unwrap();

assert_eq!(list_field.serialize_value().unwrap(), "11, (12 13), \"foo\", \"bar\"");
Loading content...

Implementors

impl ParseMore for Dictionary[src]

impl ParseMore for List[src]

Loading content...