@@ -65,7 +65,7 @@ impl Parser {
6565 /// - `bytes`: data from the start of stream to the first `<` or from `>` to `<`
6666 ///
6767 /// [`Text`]: Event::Text
68- pub fn read_text < ' b > ( & mut self , bytes : & ' b [ u8 ] ) -> Result < Event < ' b > > {
68+ pub fn emit_text < ' b > ( & mut self , bytes : & ' b [ u8 ] ) -> Result < Event < ' b > > {
6969 let mut content = bytes;
7070
7171 if self . trim_text_end {
@@ -82,7 +82,7 @@ impl Parser {
8282
8383 /// reads `BytesElement` starting with a `!`,
8484 /// return `Comment`, `CData` or `DocType` event
85- pub fn read_bang < ' b > ( & mut self , bang_type : BangType , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
85+ pub fn emit_bang < ' b > ( & mut self , bang_type : BangType , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
8686 let uncased_starts_with = |string : & [ u8 ] , prefix : & [ u8 ] | {
8787 string. len ( ) >= prefix. len ( ) && string[ ..prefix. len ( ) ] . eq_ignore_ascii_case ( prefix)
8888 } ;
@@ -129,7 +129,7 @@ impl Parser {
129129
130130 /// Wraps content of `buf` into the [`Event::End`] event. Does the check that
131131 /// end name matches the last opened start name if `self.check_end_names` is set.
132- pub fn read_end < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
132+ pub fn emit_end < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
133133 // XML standard permits whitespaces after the markup name in closing tags.
134134 // Let's strip them from the buffer before comparing tag names.
135135 let name = if self . trim_markup_names_in_closing_tags {
@@ -180,7 +180,7 @@ impl Parser {
180180
181181 /// reads `BytesElement` starting with a `?`,
182182 /// return `Decl` or `PI` event
183- pub fn read_question_mark < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
183+ pub fn emit_question_mark < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
184184 let len = buf. len ( ) ;
185185 if len > 2 && buf[ len - 1 ] == b'?' {
186186 if len > 5 && & buf[ 1 ..4 ] == b"xml" && is_whitespace ( buf[ 4 ] ) {
@@ -208,7 +208,7 @@ impl Parser {
208208 ///
209209 /// # Parameters
210210 /// - `content`: Content of a tag between `<` and `>`
211- pub fn read_start < ' b > ( & mut self , content : & ' b [ u8 ] ) -> Result < Event < ' b > > {
211+ pub fn emit_start < ' b > ( & mut self , content : & ' b [ u8 ] ) -> Result < Event < ' b > > {
212212 let len = content. len ( ) ;
213213 let name_end = content
214214 . iter ( )
0 commit comments