@@ -65,7 +65,7 @@ impl Parser {
65
65
/// - `bytes`: data from the start of stream to the first `<` or from `>` to `<`
66
66
///
67
67
/// [`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 > > {
69
69
let mut content = bytes;
70
70
71
71
if self . trim_text_end {
@@ -82,7 +82,7 @@ impl Parser {
82
82
83
83
/// reads `BytesElement` starting with a `!`,
84
84
/// 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 > > {
86
86
let uncased_starts_with = |string : & [ u8 ] , prefix : & [ u8 ] | {
87
87
string. len ( ) >= prefix. len ( ) && string[ ..prefix. len ( ) ] . eq_ignore_ascii_case ( prefix)
88
88
} ;
@@ -131,7 +131,7 @@ impl Parser {
131
131
132
132
/// Wraps content of `buf` into the [`Event::End`] event. Does the check that
133
133
/// 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 > > {
135
135
// XML standard permits whitespaces after the markup name in closing tags.
136
136
// Let's strip them from the buffer before comparing tag names.
137
137
let name = if self . trim_markup_names_in_closing_tags {
@@ -182,7 +182,7 @@ impl Parser {
182
182
183
183
/// reads `BytesElement` starting with a `?`,
184
184
/// 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 > > {
186
186
let len = buf. len ( ) ;
187
187
if len > 2 && buf[ len - 1 ] == b'?' {
188
188
if len > 5 && & buf[ 1 ..4 ] == b"xml" && is_whitespace ( buf[ 4 ] ) {
@@ -210,7 +210,7 @@ impl Parser {
210
210
///
211
211
/// # Parameters
212
212
/// - `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 > > {
214
214
let len = content. len ( ) ;
215
215
let name_end = content
216
216
. iter ( )
0 commit comments