0.11.0 - 2023-12-16
- Breaking change: While the public API has not changed, the underlying code has been re-written. By default, the parser code is much stricter and follows the XML specification more closely. For this release, the parser only has a strict mode. Future versions may have options to relax the parsing code and allow non-spec behavior.
0.10.1 - 2023-12-01
- Fix incorrect parsing CDATA issue. The
poswas not used when scanning for the CDATA. Thanks @Mingun. See Issue #8
0.10.0 - 2023-11-21
- Removed deprecated functionality.
0.9.0 - 2023-11-14
- Breaking change:
Lexer::into_inner()returns a&str. - Breaking change:
Lexer::tokenize()restores the panic behavior in previous versions. If the position argument is greater than the input's byte length, then a panic occurs. The position argument is also immediately checked to be at a UTF-8 character boundary instead of waiting for a panic in a subsequent function call. - Breaking change: Spaces around properties like attribute names, attribute values, and processing instructions are trimmed in their representations.
- Breaking change: Minimum supported Rust version is now
1.71.0. - Renamed
LexerintoReader.Lexeris still exposed as a hidden alias but will be removed in a future version. Token::ty()is madeconst.
- Remove
Fromandfrom_strimplementations from token and property types. Due to possible future implementation changes and undocumented invariants, the ability to directly construct a type is removed. - Remove
as_str(),as_bytes(),as_str_unchecked(), andinto_inner()implementations forAttributesandAttribute. Both are opaque types where the internal data may change.
- Deprecated
from_slice_unchecked()onLexer. Usecore::str::from_utf8_unchecked()on the byte slice and then pass intoReader::from_str()if the byte slice is guaranteed to be a valid UTF-8 string.
- Most functions are
conston the token and property types. Refactored most token and property type function implementations to beconstcompatible. - Add
Reader::parse()as aconstalternative function toReader::tokenize(). The function does not mutate the position argument so the position must be re-calculated likepos += token.len()in the calling code. - Add
Attributes.parse()as aconstfunction to parse the attributes likeReader::parse(). - Add
Displayimplementations toTokenand token types. - Derive
PartialOrd,Ord, andHashforTokenandTy. - Add
len()method to token types.
0.8.0 - 2023-11-11
- Add
Token::as_str()andas_str()to other token and property types.as_str()replacesto_str()oras_str_unchecked()as the preferred method to get the underlying value. - Add
Token::from_str()andfrom_str()to other token and property types. The method should be used for constructing values in tests.
- Deprecated
as_str_unchecked(),to_str()andinto_inner()onToken. - Deprecated
as_str_unchecked(),to_str()andinto_inner()on token types. - Deprecated
as_str_unchecked()andto_str()on property types.
- Remove
From<&[u8]>andAsRef<[u8]>implementations from token and property types.
- Changed the internal implementation of tokens to use
&strinstead of&[u8]. Micro benchmark performance should be similar to the previous implementation, but when usingas_str()instead ofto_str(), the calling code does not have to handle aResulttype which should increase overall performance.
0.7.2 - 2023-11-01
- Make
IteratorfromLexer::iter()into an explicit type namedIter.
- Add
Lexer::into_inner()to get the underlying bytes passed to theLexer. - Derive
PartialEq,Eq, andHashforLexerand iterators.
0.7.1 - 2023-10-31
- Modify
IntoIterto be public.
0.7.0 - 2023-10-30
- Add
Lexer::from_stras the safe instantiation method. - Refactor
Lexer::from_sliceto unsafeLexer::from_slice_unchecked. It is assumed the byte slice is UTF-8 characters, and if they are not a valid slice of UTF-8 bytes, then the behavior is undefined. - Dynamically determine
Tokentype instead of storing theTy. This reduces theTokensize to 2 words (16 octets on a 64-bit machine).
- Remove
offsetfield fromToken. If required, the offset should be calculated when tokens are consumed. - Remove
scanandScannerfrom the public API. - Remove
constfromToken::ty()method for possible future optimizations. - Remove public
newmethods fromTokenand related types.
- Add unsafe
as_str_uncheckedto various types in cases where the bytes are guaranteed to be valid UTF-8. - Add
as_bytes,to_str,as_str_unchecked, andinto_innertoToken.
0.6.0 - 2023-10-17
- Change the minimum Rust supported version to
1.56.0by moving benchmark code to own crate.
- Removed deprecated functionality.
0.5.0 - 2023-09-28
- Add
Lexertype which is the replacement for all evaluators. It borrows the input (a slice of bytes) and tokenizes with a borrowedToken. It has the benefits of both the existing evaluators (namely borrowing byte slices from the input so no allocations are necessary and allowing anIteratorAPI). - Add
scanfunction which scans for a token at the beginning of a slice.
- Add deprecations to owned token types and all evaluators. The code will be removed in a future version.
- Fixed wrong lifetimes in the borrowed token types. The lifetimes should have been tied to the borrowed input instead of the token's type.
- Derive most trait implementations for token and property types.
- Change the minimum Rust supported version to
1.60.0by changing newer syntax code likelet...elseto older supported syntax. - Add
#[must_use]andconstto functions.
- Remove Token
Fromimplementations and other methods which are available when usingas_bytes().
0.4.0 - 2023-09-19
- Fix incorrect debug representation of token properties Thanks @Mingun. See PR #3
- Change word "token" to "token property" in documentation for token properties Thanks @Mingun. See PR #4
- Replace all occurrences of word
RecvEvaluatorwith wordEvaluatorThanks @Mingun. See PR #5
- Remove unnecessary check for quote_state Thanks @Mingun. See PR #6
- Remove unnecessary parameters in various functions and simplify code. Thanks @Mingun. See PR #7
- Set Minimal Supported Rust Version (MSRV) to 1.70.0
0.3.0 - 2023-02-17
- Breaking change: Rename
RecvEvaluatorandRecvErrortoEvaluatorandErrorrespectively. Removes duplicatation of module name in type name.
0.2.0 - 2022-03-21
- Add
ProcessingInstructiontargetandinstructionsattributes - Remove
non_exhaustivefromTokenenum types.
0.1.0 - 2020-10-09
- Initial implementation.