@@ -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 } ;
@@ -131,7 +131,7 @@ impl Parser {
131131
132132 /// Wraps content of `buf` into the [`Event::End`] event. Does the check that
133133 /// end name matches the last opened start name if `self.check_end_names` is set.
134- pub fn read_end < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
134+ pub fn emit_end < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
135135 // XML standard permits whitespaces after the markup name in closing tags.
136136 // Let's strip them from the buffer before comparing tag names.
137137 let name = if self . trim_markup_names_in_closing_tags {
@@ -182,7 +182,7 @@ impl Parser {
182182
183183 /// reads `BytesElement` starting with a `?`,
184184 /// return `Decl` or `PI` event
185- pub fn read_question_mark < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
185+ pub fn emit_question_mark < ' b > ( & mut self , buf : & ' b [ u8 ] ) -> Result < Event < ' b > > {
186186 let len = buf. len ( ) ;
187187 if len > 2 && buf[ len - 1 ] == b'?' {
188188 if len > 5 && & buf[ 1 ..4 ] == b"xml" && is_whitespace ( buf[ 4 ] ) {
@@ -210,7 +210,7 @@ impl Parser {
210210 ///
211211 /// # Parameters
212212 /// - `content`: Content of a tag between `<` and `>`
213- pub fn read_start < ' b > ( & mut self , content : & ' b [ u8 ] ) -> Result < Event < ' b > > {
213+ pub fn emit_start < ' b > ( & mut self , content : & ' b [ u8 ] ) -> Result < Event < ' b > > {
214214 let len = content. len ( ) ;
215215 let name_end = content
216216 . iter ( )
0 commit comments