- Add utility functions to visit a list or an associative array for URI template expansion.
- Add methods to replace host in allocated IRI string types.
- Support creating a
build::Builderfrom IRI reference types. - Add
percent_encode::decode::decode_whatwg_bytes()and related types for percent-decoding by the user. - Add a syntax checker for
reg-nameandireg-namesyntax. - doc: Add a guidance to apply IDNA conversion to IRI types.
- internal refactoring: Reduce redundant validation of string type conversions.
- Add utility functions to visit a list or an associative array for URI template
expansion.
- List of added trait methods:
template::context::Visitor::visit_list_direct()template::context::Visitor::visit_assoc_direct()
- List of added trait methods:
- Add methods to replace host in allocated IRI string types.
- In summary, added
{,try_}replace_host{,_reg_name}methods to types that can contain authorities (i.e.,Ri{Absolute,Reference,Relative,}String). - List of added methods:
types::generic::RiAbsoluteString::replace_hosttypes::generic::RiAbsoluteString::replace_host_reg_nametypes::generic::RiAbsoluteString::try_replace_hosttypes::generic::RiAbsoluteString::try_replace_host_reg_nametypes::generic::RiReferenceString::replace_hosttypes::generic::RiReferenceString::replace_host_reg_nametypes::generic::RiReferenceString::try_replace_hosttypes::generic::RiReferenceString::try_replace_host_reg_nametypes::generic::RiRelativeString::replace_hosttypes::generic::RiRelativeString::replace_host_reg_nametypes::generic::RiRelativeString::try_replace_hosttypes::generic::RiRelativeString::try_replace_host_reg_nametypes::generic::RiString::replace_hosttypes::generic::RiString::replace_host_reg_nametypes::generic::RiString::try_replace_hosttypes::generic::RiString::try_replace_host_reg_name
- In summary, added
- Support creating a
build::Builderfrom IRI reference types.- List of added trait impls:
From<types::RiAbsoluteStr<S>> for build::Builder<'_>From<types::RiReferenceStr<S>> for build::Builder<'_>From<types::RiRelativeStr<S>> for build::Builder<'_>From<types::RiStr<S>> for build::Builder<'_>
- List of added trait impls:
- Add
percent_encode::decode::decode_whatwg_bytes()and related types for percent-decoding by the user.- List of added items:
percent_decode::decode::decode_whatwg_bytes()functionpercent_decode::decode::PercentDecodedWhatwgBytyestypepercent_decode::decode::DecodedFragmenttypepercent_decode::decode::PercentDecodedBytesFragmentiterator type
- List of added items:
- Add a syntax checker for
reg-nameandireg-namesyntax.- List of added functions:
validate::reg_name()
- List of added functions:
- doc: Add a guidance to apply IDNA conversion to IRI types.
- See the module documentation for
types::generic.
- See the module documentation for
- internal refactoring: Reduce redundant validation of string type conversions.
- Previously, syntax validations had sometimes run again on the already validated or always valid strings.
- This change will improve performance a bit for some string conversions.
- Add syntax checkers for more components of URIs/IRIs.
- Put detailed info into
validate::Errortype. - Fix
validate::path()function to accept paths starting with//. - Update links to IETF RFC documents.
- Add syntax checkers for more components of URIs/IRIs.
- List of added functions:
validate::scheme()validate::authority()validate::host()validate::port()validate::userinfo()validate::path_segment()
- Note that functions for
path,query, andfragmentcomponents have already been provided.
- List of added functions:
- Put detailed info into
validate::Errortype.- Now
validate::Errortype will provide a little more detailed error info throughDisplayandToString. - Note that the messages or the categorization is not guaranteed to be stable. For now this is purely hint for human, and that is why the error kind is not a public type.
- Now
- Fix
validate::path()function to accept paths starting with//.- Paths such as
//foo/barare valid although they cannot be used in some contexts.
- Paths such as
- Update links to IETF RFC documents.
- Links to the old domain
tools.ietf.orghas redirect, but the redirection truncates the fragment, so the links to the specific sections of documents had not been working as expected. - Now such links are updated to point to
www.rfc-editor.org, so the links in the documents and comments must be working as expected.
- Links to the old domain
- Fix decoding of percent-encoded invalid UTF-8 bytes.
- Fix decoding of percent-encoded invalid UTF-8 bytes.
- Reported at #48.
- Percent-encoded bytes starting with 0xF5 or above were wrongly handled as a 4-bytes long valid UTF-8 sequence.
- Fix unconditional failure at
RiReferenceStr::set_fragment()
- Fix unconditional failure at
RiReferenceStr::set_fragment()
- Fix URI template expansion with
template::DynamicContextto call the methodson_expansion_startandon_expansion_end.
- Fix URI template expansion with
template::DynamicContextto call the methodson_expansion_startandon_expansion_end.
- Add
fragment_str()methods that returns a fragment in a raw string slice.
- Add
fragment_str()methods that returns a fragment in a raw string slice.- List of added methods:
RiStr::fragment_str()RiReferenceStr::fragment_str()RiRelativeStr::fragment_str()
- List of added methods:
- Fix unsoundness of
template::UriTemplateStr
- Fix unsoundness of
template::UriTemplateStr- The type should have
#[repr(transparent)]to compile safely but did not. - Any creations and uses of the value are undefined behavior without the fix, while the current version of the Rust compiler seems to happen to generate the expected binary (without any guarantee).
- The type should have
- Fix calculation of template expansion error location.
- Currently this just appears in an error message but not exposed through any other public API.
- Add an iterator of variables that appears in a URI template.
- Support URI template expansion with a mutable context.
- Add an iterator of variables that appears in a URI template.
- List of added items:
template::UriTemplateStr::variables()methodtemplate::UriTemplateVariables<'_>iterator type
- List of added items:
- Support URI template expansion with a mutable context.
- Add methods
template::UriTemplateStr::expand_dynamic()andtemplate::UriTemplateStr::expand_dynamic_to_string(). - Add
template::context::DynamicContexttrait for mutable context. - Add
template::context::Visitor::purpose()method andtemplate::context::VisitPurposetype to enable users to know for what purpose the variable is being visited.
- Add methods
- Fix calculation of template expansion error location.
- Currently this error location info just appears in an error message (from
<template::Error as std::fmt::Display>::fmt), but not exposed through any other public API.
- Currently this error location info just appears in an error message (from
- Add easy conversion from an expanded template into IRI/URI string types.
- Add easy conversion from an expanded template into IRI/URI string types.
- List of added conversions:
TryFrom<template::Expanded<'_, S, C>> for types::RiAbsoluteString<S>TryFrom<template::Expanded<'_, S, C>> for types::RiReferenceString<S>TryFrom<template::Expanded<'_, S, C>> for types::RiRelativeString<S>TryFrom<template::Expanded<'_, S, C>> for types::RiString<S>
- List of added conversions:
- Fix a bug that some abnormal IRIs that have no authority and end with
/.resulted in wrong normalization that generate unintentional authorities.- Reported at #36.
- Fix a bug that the normalization incorrectly omits percent-encoded triplets
partially if they constitute invalid UTF-8 byte sequence.
- Reported at #36.
- Fix a bug that some abnormal IRIs that have no authority and end with
/.resulted in wrong normalization that generate unintentional authorities.- Reported at #36.
- IRI resolution and normalization had this bug, but only for IRIs without authority.
- This happened when the resolution and normalization result should not contain
an authority but the path part resulted in
//..- For example,
a:/.//.anda:/bar/..//.should be normalized toa:/.//, but the actual result wasa://due to this bug.
- For example,
- Fix a bug that the normalization incorrectly omits percent-encoded triplets
partially if they constitute invalid UTF-8 byte sequence.
- Reported at #36.
- URIs and IRIs that only contains the percent-encoded triplets for valid UTF-8 byte sequences won't be affected.
- Add
new_unchecked()methods to string types. - Move
template::VarNametype intotemplate::contextmodule and deprecate the old name. - Add
template::context::VarName::new()method. - Add component getters to
resolve::FixedBaseResolver. - Fix some lint warnings detected by newer clippy.
- Add
new_unchecked()methods to string types.- List of added methods:
template::UriTemplateStr::new_unchecked()template::UriTemplateString::new_unchecked()types::RiAbsoluteStr::new_unchecked()types::RiAbsoluteString::new_unchecked()types::RiFragmentStr::new_unchecked()types::RiFragmentString::new_unchecked()types::RiQueryStr::new_unchecked()types::RiQueryString::new_unchecked()types::RiReferenceStr::new_unchecked()types::RiReferenceString::new_unchecked()types::RiRelativeStr::new_unchecked()types::RiRelativeString::new_unchecked()types::RiStr::new_unchecked()types::RiString::new_unchecked()
- List of added methods:
- Add
template::context::VarName::new()method. - Add component getters to
resolve::FixedBaseResolver.- List of added methods:
resolve::FixedBaseResolver::scheme_str()resolve::FixedBaseResolver::authority_str()resolve::FixedBaseResolver::path_str()resolve::FixedBaseResolver::query()resolve::FixedBaseResolver::query_str()resolve::FixedBaseResolver::fragment_str()
- List of added methods:
- Move
template::VarNametype intotemplate::contextmodule and deprecate the old name.- The old name (
template::VarName) is still available while it is marked as deprecated.
- The old name (
- Add
templatemodule that contains URI Template (RFC 6570) processor. - Add
PercentEncoded::{unreserve,characters}methods. - Remove "WHATWG" normalization.
- Add normalization that preserves relative path in some special condition.
- Add
templatemodule that contains URI Template (RFC 6570) processor.- The processor supports nostd environment.
- Add
PercentEncoded::{unreserve,characters}methods.- List of added methods:
percent_encode::PercentEncoded::characters()percent_encode::PercentEncoded::unreserve()
- List of added methods:
- Add normalization that preserves relative path in some special condition.
- When the authority component is absent and the path is relative, the dot-segments removal is not applied to the path. This behavior is inspired by WHATWG URL Standard, but the implementation is not guaranteed to follow that spec.
- List of added items:
types::RiStr::normalize_but_preserve_authorityless_relative_path()types::RiStr::is_normalized_but_authorityless_relative_path_preserved()types::RiAbsoluteStr::normalize_but_preserve_authorityless_relative_path()types::RiAbsoluteStr::is_normalized_but_authorityless_relative_path_preserved()normalize::Normalized::and_normalize_but_preserve_authorityless_relative_path()normalize::Normalized::enable_normalization_preserving_authorityless_relative_path()
- Note that this normalization algorithm is not compatible with RFC 3986 algorithm for some inputs.
- Remove non-compliant "WHATWG" normalization.
- Fixes the issue #29 and #30.
- Previous implementations of normalization is described as "defined in WHATWG spec", but they were not compliant to the spec. Specifically, when the authority component is absent and the path is relative, WHATWG spec requires the path to be treated as "opaque", but the old implementation applied dot-segments removal to the path.
- List of removed items:
types::RiStr::is_normalized_whatwg()types::RiAbsoluteStr::is_normalized_whatwg()
- Bump MSRV to 1.60.0.
- Remove
memchr-std,serde-alloc, andserde-stdfeatures.- Now
allocand/orstdfeatures for additional dependencies are automatically enabled when all of dependent featuers are enabled.
- Now
- Support escaping username and password by
percent_encode::PercentEncode. - Add
formatmodule that contains utilities for types withDisplaytrait impl.- Add
format::ToStringFallibletrait. - Add
format::ToDedicatedStringtrait. - Add
format::write_to_slicefunction andformat::CapacityOverflowtype. - Add
format::try_append_to_stringfunction.
- Add
- Remove
taskmodule andtask::ProcessAndWritetrait.- Remove
taskmodule. - Remove
ProcessAndWritetrait implementation frompercent_encode::PercentEncodedtype. - Remove
ProcessAndWritetrait implementation fromconvert::MappedToUritype.
- Remove
- Remove "task" types.
- Remove
normalize::NormalizationTasktype. - Remove
normalize::NormalizationTasktype.- Use
normalize::Normalizedinstead.
- Use
- Remove
- Change return types of some functions from task types or string types to
Display-able types.- Change return types of
{BorrowedIri}::encode_to_uritoconvert::MappedToUri<'_, Self>. - Change return type of
resolve::FixedBaseResolver::resolve()method tonoramlize::Normalized. - Change return type of
{BorrowedIri}::normalize()method tonormalize::Normalized. - Change return type of
{BorrowedIri}::resolve_against()method tonormalize::Normalized. - Remove
BufferErrortype.
- Change return types of
- Change API of IRI-to-URI conversion.
- Rename
{OwnedIri}::encode_to_urito{OwnedIri}::encode_to_uri_inline. - Add
{OwnedIri}::try_encode_to_uri_inlinemethod. - Add
{OwnedIri}::try_encode_into_urimethod.
- Rename
- Make the methods impl of
convert::MappedToUri<'_, T>generic over the spec. - Revome functions under
resolvemodule. - Add
normalize::Normalizedtype. - Remove some methods of
resolve::FixedBaseResolver. - Rename
{BorrowedIri}::is_normalized()methods to{BorrowedIri}::is_normalized_rfc3986(). - Remove some methods of borrowed IRI string types.
- Support password masking.
- Add
mask_passwordmodule. - Add
{BorrowedIri}::mask_passwordmethod. - Add
{OwnedIri}::remove_password_inlineand{OwnedIri}::remove_nonempty_password_inline()methods.
- Add
- Remove deprecated
percent_encodingmodule and aliases defined in it. - Unify normalization of
build::Builder.- Add
build::Builder::normalize()method. - Add
build::Built::ensure_rfc3986_normalizable()method. - Change return type of
build::Builder::build(). - Remove
build::Builder::normalize_rfc3986()andbuild::Builder::normalize_whatwg()methods. - Remove
build::Errortype.
- Add
- Stop accepting user part as
Option<&str>type forbuild::Builder::userinfo - Reject user with colon characters on IRI build.
- Allow builders to normalize
pathcomponent of relative IRIs if safely possible.
- Support escaping username and password by
percent_encode::PercentEncode.- List of added functions:
percen_encode::PercentEncode::from_user()percen_encode::PercentEncode::from_password()
- List of added functions:
- Add
format::ToStringFallibletrait.- This trait allows users to convert
Display-able values intoString, but without panicking on OOM. - List of types that implements this trait:
build::Built<'_, RiReferenceStr<S>>build::Built<'_, RiStr<S>>build::Built<'_, RiAbsoluteStr<S>>build::Built<'_, RiRelativeStr<S>>
- This trait allows users to convert
- Add
format::ToDedicatedStringtrait.- This trait allows users to convert
Display-able values into owned dedicated IRI string types, with or without panicking on OOM. - List of added implementations:
build::Built<'_, RiReferenceStr<S>>(Target =RiReferenceString<S>)build::Built<'_, RiStr<S>>(Target =RiString<S>)build::Built<'_, RiAbsoluteStr<S>>(Target =RiAbsoluteString<S>)build::Built<'_, RiRelativeStr<S>>(Target =RiRelativeString<S>)convert::MappedToUri<'_, RiReferenceStr<S>>(Target =RiReferenceString<S>)convert::MappedToUri<'_, RiStr<S>>(Target =RiString<S>)convert::MappedToUri<'_, RiAbsoluteStr<S>>(Target =RiAbsoluteString<S>)convert::MappedToUri<'_, RiRelativeStr<S>>(Target =RiRelativeString<S>)convert::MappedToUri<'_, RiQueryStr<S>>(Target =RiQueryString<S>)convert::MappedToUri<'_, RiFragmentStr<S>>(Target =RiFragmentString<S>)
- This trait allows users to convert
- Add
format::write_to_slicefunction andformat::CapacityOverflowtype. - Add
format::try_append_to_stringfunction. - Add
{OwnedIri}::try_encode_to_uri_inlinemethod. - Add
{OwnedIri}::try_encode_into_urimethod. - Add
normalize::Normalizedtype.- This replaces
normalize::NormalizationTasktype in previous versions.
- This replaces
- Add
mask_passwordmodule.- Items in this module let users hide or replace password to keep sensitive information secret.
- List of added items:
mask_password::PasswordMaskedtypemask_password::PasswordReplacedtype
- Add
{BorrowedIri}::mask_passwordmethod.- List of added methods:
types::RiReferenceStr::mask_password()types::RiStr::mask_password()types::RiAbsoluteStr::mask_password()types::RiRelativeStr::mask_password()
- List of added methods:
- Add
{OwnedIri}::remove_password_inlineand{OwnedIri}::remove_nonempty_password_inline()methods.- List of added methods:
types::RiReferenceString::remove_password_inline()types::RiReferenceString::remove_nonempty_password_inline()types::RiString::remove_password_inline()types::RiString::remove_nonempty_password_inline()types::RiAbsoluteString::remove_password_inline()types::RiAbsoluteString::remove_nonempty_password_inline()types::RiRelativeString::remove_password_inline()types::RiRelativeString::remove_nonempty_password_inline()
- List of added methods:
- Add
build::Builder::normalize()method. - Add
build::Built::ensure_rfc3986_normalizable()method.
- Bump MSRV to 1.60.0.
- Remove
memchr-std,serde-alloc, andserde-stdfeatures.- Now
allocand/orstdfeatures for additional dependencies are automatically enabled when all of dependent featuers are enabled.
- Now
- Remove
ProcessAndWritetrait implementation frompercent_encode::PercentEncodedtype. - Remove
ProcessAndWritetrait implementation fromconvert::MappedToUritype. - Change return types of
{BorrowedIri}::encode_to_uritoconvert::MappedToUri<'_, Self>.- The code
borrowed.encode_to_uri()in older versions should be rewritten toborrowed.encode_to_uri().to_dedicated_string().
- The code
- Rename
{OwnedIri}::encode_to_urito{OwnedIri}::encode_to_uri_inline. - Remove
normalize::NormalizationTasktype.- Use
normalized::Normalizedtype instead.
- Use
- Revome functions under
resolvemodule.- List of removed functions:
resolve::resolve()resolve::resolve_normalize()resolve::resolve_whatwg()resolve::resolve_normalize_whatwg()resolve::try_resolve()resolve::try_resolve_normalize()resolve::try_resolve_whatwg()resolve::try_resolve_normalize_whatwg()
- List of removed functions:
- Remove
normalize::NormalizationTasktype.- Use
normalize::Normalizedinstead.
- Use
- Remove some methods of
resolve::FixedBaseResolver.- List fo removed methods:
resolve::FixedBaseResolver::try_resolve()resolve::FixedBaseResolver::try_resolve_normalize()resolve::FixedBaseResolver::resolve_normalize()resolve::FixedBaseResolver::create_task()resolve::FixedBaseResolver::create_normalizing_task()
- List fo removed methods:
- Change return type of
resolve::FixedBaseResolver::resolve()tonoramlize::Normalized. - Rename
{BorrowedIri}::is_normalizedmethods to{BorrowedIri}::is_normalized_rfc3986.- List of renamed methods:
types::RiStr::is_normalizedtotypes::RiStr::is_normalized_rfc3986types::RiAbsoluteStr::is_normalizedtotypes::RiAbsoluteStr::is_normalized_rfc3986
- List of renamed methods:
- Change return type of
{BorrowedIri}::normalize()method tonormalize::Normalized.- List of affected methods:
types::RiStr::normalize()types::RiAbsoluteStr::normalize()
- List of affected methods:
- Remove some methods of borrowed IRI string types.
- List of removed methods:
types::RiReferenceStr::try_resolve_against()types::RiReferenceStr::try_resolve_whatwg_against()types::RiReferenceStr::resolve_whatwg_against()types::RiReferenceStr::try_resolve_normalize_against()types::RiReferenceStr::resolve_normalize_against()types::RiReferenceStr::try_resolve_normalize_whatwg_against()types::RiReferenceStr::resolve_normalize_whatwg_against()types::RiStr::try_normalize()types::RiStr::try_normalize_whatwg()types::RiStr::normalize_whatwg()types::RiAbsoluteStr::try_normalize()types::RiAbsoluteStr::try_normalize_whatwg()types::RiAbsoluteStr::normalize_whatwg()types::RiRelativeStr::try_resolve_against()types::RiRelativeStr::try_resolve_whatwg_against()types::RiRelativeStr::resolve_whatwg_against()types::RiRelativeStr::try_resolve_normalize_against()types::RiRelativeStr::resolve_normalize_against()types::RiRelativeStr::try_resolve_normalize_whatwg_against()types::RiRelativeStr::resolve_normalize_whatwg_against()
- List of removed methods:
- Change return type of
{BorrowedIri}::resolve()method tonormalize::Normalized.- List of affected methods:
types::RiReferenceStr::resolve_against()types::RiRelativeStr::resolve_against()
- List of affected methods:
- Remove
BufferErrortype. - Remove
taskmodule.- List of removed items:
task::Errortypetask::ProcessAndWritetrait
- List of removed items:
- Remove deprecated
percent_encodingmodule and aliases defined in it.- List of removed items:
percent_encodingmodule.percent_encoding::PercentEncodedtype alias.percent_encoding::PercentEncodedForIritype alias.percent_encoding::PercentEncodedForUritype alias.
- List of removed items:
- Change return type of
build::Builder::build().- Now it returns
Result<(), validate::Error>instead ofResult<(), build::Error>.
- Now it returns
- Remove
build::Builder::normalize_rfc3986()andbuild::Builder::normalize_whatwg()methods.- Use
build::Builder::normalize()andbuild::Builder::ensure_rfc3986_normalizable()instead.
- Use
- Remove
build::Errortype. - Stop accepting user part as
Option<&str>type forbuild::Builder::userinfo- Now user part should be non-optional (but possibly empty)
&str.
- Now user part should be non-optional (but possibly empty)
- Make methods of
convert::MappedToUri<'_, T>generic over the spec.- Now methods of
convert::MappedToUri<'_, T>can be called for{BorrowedIri}<S> where S: Spec.
- Now methods of
- Reject user with colon characters on IRI build.
- Now
build::Builder::build()fails whenuserpart contains a colon (:).
- Now
- Allow builders to normalize
pathcomponent of relative IRIs if safely possible.
- Fix normalization bug.
- Previously, trailing colon of an authority (with empty port) was not stripped. Now this is fixed.
- Add
ensure_rfc3986_normalizable()methods to absolute IRI string types. - Add IRI builder in
buildmodule. - Deprecate
percent_encodingmodule in favor of the new namepercent_encode.
- Add
ensure_rfc3986_normalizable()methods to absolute IRI string types.- List of added functions:
types::RiStr::ensure_rfc3986_normalizable()types::RiAbsoluteStr::ensure_rfc3986_normalizable()
- List of added functions:
- Add IRI builder in
buildmodule.Buildertype is a builder.DisplayBulidtype is a validated build result (but not yet heap-allocates).PortBuilderandUserinfoBuildertypes are intermediate types to provide convenient generics to component setters.Errortype is a builder error.Buildabletrait indicates the syntax corresponding to the string types (such asIriStrorUriReferenceStr) can be constructed by the builder.
- Fix normalization bug.
- Previously, trailing colon of an authority (with empty port) was not stripped. Now this is fixed.
- Deprecate
percent_encodingmodule in favor of the new namepercent_encode.- Previously exported items are still provided from
percent_encodingmodule to keep backward compatibility.
- Previously exported items are still provided from
- Add
RiQueryStrandRiQueryStringtypes for query. - Add functions with
try_prefix are introduced for normalization and IRI resolution, and deprecate non-tryversions. - Add encoder types for percent-encoding in
percent_encodingmodule.
- Add
RiQueryStrandRiQueryStringtypes for query. - Add functions with
try_prefix are introduced for normalization and resolution.- List of added functions:
types::RiStr::try_normalize()types::RiStr::try_normalize_whatwg()types::RiAbsoluteStr::try_normalize()types::RiAbsoluteStr::try_normalize_whatwg()resolve::try_resolve()resolve::try_resolve_whatwg()resolve::try_resolve_normalize()resolve::try_resolve_normalize_whatwg()types::RiReferenceStr::try_resolve_against()types::RiReferenceStr::try_resolve_normalize_against()types::RiReferenceStr::try_resolve_whatwg_against()types::RiReferenceStr::try_resolve_normalize_whatwg_against()types::RiRelativeStr::try_resolve_against()types::RiRelativeStr::try_resolve_normalize_against()types::RiRelativeStr::try_resolve_whatwg_against()types::RiRelativeStr::try_resolve_normalize_whatwg_against()
- List of added functions:
- Add encoder types for percent-encoding in
percent_encodingmodule.- List of added types:
percent_encoding::PercentEncodedpercent_encoding::PercentEncodedForIri(type alias)percent_encoding::PercentEncodedForUri(type alias)
- List of added types:
- Deprecate non-
tryfunction names for normalization and resolution.- List of deprecated functions:
types::RiStr::normalize()types::RiStr::normalize_whatwg()types::RiAbsoluteStr::normalize()types::RiAbsoluteStr::normalize_whatwg()resolve::resolve()resolve::resolve_whatwg()resolve::resolve_normalize()resolve::resolve_normalize_whatwg()types::RiReferenceStr::resolve_against()types::RiReferenceStr::resolve_normalize_against()types::RiReferenceStr::resolve_whatwg_against()types::RiReferenceStr::resolve_normalize_whatwg_against()types::RiRiAblosuteStrStr::resolve_against()types::RiRiAblosuteStrStr::resolve_normalize_against()types::RiRiAblosuteStrStr::resolve_whatwg_against()types::RiRiAblosuteStrStr::resolve_normalize_whatwg_against()
- Use functions with
try_prefix instead.
- List of deprecated functions:
- Implement IRI resolution and normalization that uses serialization algorithm described in WHATWG URL Standard.
- Implement IRI resolution and normalization that uses serialization algorithm
described in WHATWG URL Standard.
- They won't fail even when the input or result is abnormal (but of course they may still fail on memory shortage).
- The difference between RFC 3986/3987 versions and WHATWG versions is,
handling of absent host and path starting with
//. The RFC versions fail sincescheme://not-a-hostis invalid, but WHATWG versions serializes the result asscheme:/.//not-a-host. - List of added functions:
resolve::resolve_whatwg()resolve::resolve_normalize_whatwg()normalize::NormalizationTask::enable_normalization()normalize::NormalizationTask::enable_whatwg_serialization()types::RiStr::is_normalized_whatwg()types::RiStr::normalize_whatwg()types::RiAbsoluteStr::is_normalized_whatwg()types::RiAbsoluteStr::normalize_whatwg()types::RiReferenceStr::resolve_normalize_whatwg_against()types::RiReferenceStr::resolve_whatwg_against()types::RiRelativeStr::resolve_normalize_whatwg_against()types::RiRelativeStr::resolve_whatwg_against()
- Decode percent-encoded unreserved characters on normalizaiton.
- Add
is_normalizedmethod to absolute URI/IRI types. - Implement more conversion traits from string types to
Cow,Box,Rc, andArc. - Improve documents.
- Add
is_normalizedmethod to absolute URI/IRI types.- They don't heap-allocate.
- Implement more conversion traits from string types to
Cow,Box,Rc, andArc.- List of added conversions:
From<&'a $slice> for Cow<'a, $slice>From<&'_ $slice> for Box<$slice>From<&'_ $slice> for Rc<$slice>From<&'_ $slice> for Arc<$slice>From<$owned> for Cow<'_, $owned>From<$owned> for Box<$owned>
- List of added conversions:
- Decode percent-encoded unreserved characters on normalizaiton.
- Previous implementation incorrectly leave unreserved percent-encoded characters as is, but now this is fixed.
- Fix IPvFuture literal parsing again (#17).
- Fix IPvFuture literal parsing again (#17).
- Add
FixedBaseResolver::base()method. - Fix IP literal parsing and decomposition (#17).
- Add
FixedBaseResolver::base()method.
- Fix IP literal parsing and decomposition (#17).
This entry describes the changes since the previous stable release (v0.4.1).
- Bump MSRV to 1.58.0.
- Add more conversions from/to IRI string types.
- Implement
TryFrom<&[u8]>for the IRI string types. - Implement
From<{owned URI}>for the owned IRI string types. - Add
as_slicemethod to the owned string types. - Add
convert::MappedToUritype. - Add
encode_to_uri()method for the IRI string types. - Add
encode_into_uri()method for the owned IRI string types. - Add
as_uri()method for the borrowed IRI string types. - Add
try_into_uri()method for the owned IRI string types.
- Implement
- Add
capacity()method to the owned string types. - Add components getters for borrowed string types.
- Add IRI normalization API and related types.
- Add normalizing variations for IRI resolution.
- Support nostd for IRI resolution.
- Change IRI resolution API incompatibly.
- Change number and types of parameters.
- Change return types.
- Let IRI resolution recognize percent-encoded period during normalization.
- Drop internal dependency to
nomcrate. - Permit
serde+{alloc,std}withoutserde-{alloc,std}. - Update examples.
- Improve
parseexample to show more information. - Add
normalizeexample.
- Improve
- Travis CI is no longer used.
- Checks should be run manually. See README for detail.
- Add more conversions from/to IRI string types.
- Implement
TryFrom<&[u8]>for the IRI string types. - Implement
From<{owned URI}>for the owned IRI string types. - Add
as_slicemethod to the owned string types. - Add
convert::MappedToUritype. - Add
encode_to_uri()method for the IRI string types. - Add
encode_into_uri()method for the owned IRI string types. - Add
as_uri()method for the borrowed IRI string types. - Add
try_into_uri()method for the owned IRI string types.
- Implement
- Add
capacity()method to the owned string types. - Add components getters for borrowed string types.
- Add getters for major components of IRIs/URIs:
scheme,authority,path, andquery. - Add types and getters for subcomponents of
authority:userinfo,host, andport.components::AuthorityComponentstype andauthority_componentsmethod.
- Add getters for major components of IRIs/URIs:
- Add IRI normalization API and related types.
- Add
{RiStr, RiAbsoluteStr}::normalize()methods. - Add
normalize::NormalizationTask.
- Add
- Add normalizing variations for IRI resolution.
resolve_normalizeforresolve.resolve_normalize_againstforresolve_against.
- Support nostd for IRI resolution.
- Add
resolve::FixedBaseResolverto getnormalize::NormalizationTask. - Users can write the resolution/normalization result to user-provided buffer by
NormalizationTask.
- Add
- Update examples.
- Add
normalizeexample.
- Add
- Bump MSRV to 1.58.0.
- Rust 1.58.0 is released at 2022-01-13.
- Change IRI resolution API incompatibly.
- Remove
is_strict: boolparameter fromresolve::resolve(). - Make IRI resolution fallible.
- Now IRI resolution returns
Result. - For details about possible resolution/normalization failure, see the
documentation for
normalizemodule and the issue How/..//barshould be resolved aganstscheme:? (#8).
- Now IRI resolution returns
- Remove
- Let IRI resolution recognize percent-encoded period during normalization.
- For example,
/%2e%2e/in the path are now recognized as/../, and handled specially as "parent directory".
- For example,
- Drop internal dependency to
nomcrate.- Parsers are rewritten manually, and are now much faster than before.
- Permit
serde+{alloc,std}withoutserde-{alloc,std}.- Previously, compilation error are intentionally caused when both
serdeand{alloc,std}are enabled but correspondingserde-{alloc,std}is not. - Note that you still need to enable
serde-allocorserde-stdto use serde support for owned string types.- This change only intends to support the cases when flags are independently enabled from different indirect dependencies.
- Previously, compilation error are intentionally caused when both
- Update examples.
- Improve
parseexample to show more information.
- Improve
(0.5.0 from 0.5.0-rc.0)
- Travis CI is no longer used.
- Checks should be run manually. See README for detail.
No more API changes are planned until v0.5.0.
- Add more conversions from IRI to URI string types.
- Add
as_uri()method for the borrowed IRI string types. - Add
try_into_uri()method for the owned IRI string types.
- Add
- Update examples.
- Improve
parseexample to show more information. - Add
normalizeexample.
- Improve
- Add more conversions from IRI to URI string types.
- Add
as_uri()method for the borrowed IRI string types. - Add
try_into_uri()method for the owned IRI string types.
- Add
- Update examples.
- Add
normalizeexample.
- Add
- Update examples.
- Improve
parseexample to show more information.
- Improve
- Add more conversions from/to IRI string types.
- Implement
From<{owned URI}>for the owned IRI string types. - Add
as_slicemethod to the owned string types. - Add
convert::MappedToUritype. - Add
encode_to_uri()method for the IRI string types. - Add
encode_into_uri()method for the owned IRI string types.
- Implement
- Refine task API
- Move some methods of
normalize::NormalizationTaskinto newly addedtask::ProcessAndWritetrait.allocate_and_write,write_to_byte_slice,append_to_std_string, andtry_append_to_std_stringis moved.
- Change type parameter of
NormalizationTaskfrom a spec into a string slice type. - Change error type for
NormalizationTask. - Remove
normalize::create_task()function.
- Move some methods of
- Add more conversions from/to IRI string types.
- Implement
From<{owned URI}>for the owned IRI string types. - Add
as_slicemethod to the owned string types. - Add
convert::MappedToUritype. - Add
encode_to_uri()method for the IRI string types. - Add
encode_into_uri()method for the owned IRI string types.
- Implement
- Move some methods of
normalize::NormalizationTaskinto newly addedtask::ProcessAndWritetrait.allocate_and_write,write_to_byte_slice,append_to_std_string, andtry_append_to_std_stringis moved.
- Change type parameter of
NormalizationTaskfrom a spec into a string slice type.- Now
NormalizationTask<S>should be changed toNormalizationTask<RiStr<S>>orNormalizationTask<RiAbsoluteStr<S>>. - This enables the task to return more appropriate type. For example,
returning
&RiAbsoluteStr<S>rather than&RiStr<S>when the input IRI type isRiAbsoluteStr<S>.
- Now
- Change error type for
NormalizationTask.- Now buffer error and processing error is split to different types.
- Remove
normalize::create_task()function.
- Add
normalizemodule, and unify it with IRI resolution.- Move
resolve::{Error, ErrorKind}tonormalizemodule. - Move and rename
resolve::ResolutionTasktonormalize::NormalizationTask. - Add
normalize::create_taskfunction. - Add
{RiStr, RiAbsoluteStr}::normalize()methods.
- Move
- Add normalizing variations for IRI resolution.
- Add
normalizemodule.- Add
normalize::create_task()function. - Add
{RiStr, RiAbsoluteStr}::normalize()methods.
- Add
- Add normalizing variations for IRI resolution.
resolve_normalizeforresolve.resolve_normalize_againstforresolve_against.
- Move
resolve::{Error, ErrorKind}tonormalizemodule. - Move and rename
resolve::ResolutionTasktonormalize::NormalizationTask.- Now
resolve::FixedBaseResolver::create_task()returnsNormalizationTask.
- Now
- Fix a bug that
serde-stdfeature did not enable serde support for owned types.
- Fix a bug that
serde-stdfeature did not enable serde support for owned types.- Now
serde-stdenablesallocfeatures automatically.
- Now
- Add getters for major components of IRIs/URIs:
scheme,authority,path, andquery. - Add types and getters for subcomponents of
authority:userinfo,host, andport.components::AuthorityComponentstype andauthority_componentsmethod.
- Fix a bug that
serde-stdfeature did not enable serde support for owned types.
- Add getters for major components of IRIs/URIs:
scheme,authority,path, andquery.- Method names are
scheme_str,authority_str,path_str, andquery_str, respectively. - Getters for
fragmentcomponent is already provided.
- Method names are
- Add getter for subcomponents of
authority:userinfo,host, andport.components::AuthorityComponentstype andauthority_componentsmethod.
- Fix a bug that
serde-stdfeature did not enable serde support for owned types.- Now
serde-stdenablesallocfeatures automatically.
- Now
- Bump MSRV to 1.58.0.
- Add conversion from a byte slice (
&[u8]) into IRI string types. - Add
capacitymethod to allocated string types. - Remove
is_strict: boolparameter fromresolve::resolve(). - Add
resolve::FixedBaseResolver,resolve::ResolutionTask, andresolve::Errortypes.- Some methods for IRI resolution are now available even when
allocfeature is disabled. - See IRI resolution using user-provided buffers (#6).
- Some methods for IRI resolution are now available even when
- Make IRI resolution fallible.
- Now
resolve()and its family returnsResult<_, resolve::Error>. - See How
/..//barshould be resolved aganstscheme:? (#8).
- Now
- Make IRI resolution recognize percent-encoded period.
- Now
%2Eand%2ein path segment is handled as a plain period.. - See Recognize percent-encoded periods (
%2E) during IRI resolution (#9)
- Now
- Make parsers faster.
- Drop internal dependency to
nom. - Stop emitting compilation error when both
serdeandstd/allocare enabled without correspondingserde-{std,alloc}features.
- Add conversion from a byte slice (
&[u8]) into IRI string types. - Add
capacitymethod to allocated string types.shrink_to_fit()andlen()already exists, so this would be useful to determine when to doshrink_to_fit.
- Add
resolve::FixedBaseResolver,resolve::ResolutionTask, andresolve::Errortypes.- They provide more efficient and controllable IRI resolution.
- Some methods for IRI resolution are now available even when
allocfeature is disabled.
- Bump MSRV to 1.58.0.
- Rust 1.58.0 is released at 2022-01-13.
- Remove
is_strict: boolparameter fromresolve::resolve().- The IRI parsers provided by this crate is "strict", so resolution algorithm should use an algorithm for the strict parser.
- Make IRI resolution fallible.
- Now
resolve()and its family returnsResult<_, resolve::Error>. - For the reasons behind, see crate-level documentation.
- See How
/..//barshould be resolved aganstscheme:? (#8).
- Now
- Make IRI resolution recognize percent-encoded period.
- Now
%2Eand%2ein path segment is handled as a plain period.. - Period is
unreservedcharacter, and can be escaped at any time (see RFC 3986 section 2.4. This means that%2Eand%2ein the path can be normalized to.before IRI resolution, and thus they should also be handled specially duringremove_dot_segmentsalgorithm. - See Recognize percent-encoded periods (
%2E) during IRI resolution (#9)
- Now
- Make parsers faster.
- Parsers are rewritten, and they became very fast!
- Almost all usages are affected: type conversions, validations, and IRI resolutions.
- See Make the parsers faster (#7)
- Drop internal dependency to
nom.- Parsers are rewritten without
nom.
- Parsers are rewritten without
- Stop emitting compilation error when both
serdeandstd/allocare enabled without correspondingserde-{std,alloc}features.serdeandstd/allocmight be enabled independently from the different indirect dependencies, so this situation should not be compilation error.
- Bump internal dependency.
nomfrom v6 to v7.
- Bump internal dependency.
nomfrom v6 to v7.
- MSRV is bumped to 1.48.0.
- Internal dependencies are bumped.
nomcrate is bumped to 6.
serde::{Serialize, Deserialize}is now implemented only for types with valid spec types.- Feature flags are refactored.
- MSRV is bumped to 1.48.0.
- Rust 1.48.0 is released at 2020-11-19.
serde::{Serialize, Deserialize}is now implemented only for types with valid spec types.- Strictly this is a breaking change, but this only forbids the meaningless trait impls, so no real world use cases won't be affected by this change.
- Feature flags are refactored.
serde-allocandserde-stdflags are added to control serde's alloc and std support.- Unintended dependency from
stduse flag toserdecrate is now fixed. Users who want to enableserdeandstdat the same time should also enableserde-stdfeature. Same applies forserdeandallocpair.
This release contains huge changes, and CHANGELOG may be incomplete. Beleive rustdoc rather than this CHANGELOG.
- Minimum supported Rust version is now 1.41 or above.
- Make IRI string types polymorphic, and rename some types.
- Now IRI types and URI types can share the same codebase.
- This makes it easy for users to implement functions for both IRI types and URI types.
- Add URI types.
- Remove
Derefimpls for IRI string types. - Remove depraceted items.
- Add and change methods for IRI string types.
resolve::resolve_iriis now (more) polymorphic, and renamed toresolve::resolve.- Update some internal dependencies.
- This has no effect for usual users, and this does not introduce any API changes.
- By this change, the crate now successfully compiles with minimal dependency versions.
- Support
no_stdenvironment.stdandallocfeature flags are added.stdfeature is enabled by default (andstdenablesallocautomatically).
- Update some internal dependencies to make the crate buildable with minimal dependency versions.
- This has no effect for usual users, and this does not introduce any API changes.
- By this change, the crate now successfully compiles with minimal dependency versions.
- To test that, you can run
cargo +nightly update -Z minimal-versions && cargo test --all-features.
- To test that, you can run
- Make IRI string types polymorphic, and rename some types.
- Now IRI types and URI types can share the same codebase.
- This makes it easy for users to implement functions for both IRI types and URI types.
- Polymorphic types are named
types::Ri{,Absolute,Fragment,Reference,Relative}Str{,ing}. - Type aliases for monomorphized types are also provided, but naming convertions are the same.
They are named
{Iri,Uri}{..}Str{,ing}.- For example, there is
IriAbsoluteStrinstead of legacyAbsoluteIriStr.
- For example, there is
types::CreationErroris now revived.types::IriCreationErroris now removed in favor oftypes::CreationError.
- Remove depraceted items.
IriReferenceStr::resolve()is now removed. UseIriReferenceStr::resolve_against()instead.
- Remove
Derefimpls for IRI string types.- IRI string types should not implement
Deref, because they are not smart pointer types.
- IRI string types should not implement
- Change methods types.
IriReferenceStr::resolve_against()now returnsCow<'_, IriStr>, rather thanIriString.
resolve::resolve_iriis now polymorphic, and renamed toresolve::resolve.- Now it can be used for both IRI types and URI types.
- Support
no_stdenvironment.stdandallocfeature flags are added.stdfeature is enabled by default (andstdenablesallocautomatically).- In
no_stdenvironment with allocator support, you can enableallocfeature.
- Add methods for IRI string types.
len()andis_empty()methods are added to all IRI string slice types.IriStr::fragment()is added.RelativeIriStr::resolve_against()is added.
- Add URI types.
- Fixed a bug that URI validators wrongly accepts non-ASCII characters.
- Now they rejects non-ASCII characters correctly.
- Fixed a bug that abnormal URIs (such as
foo://orfoo:////) are wrongly rejected.- Now they are accepted as valid IRIs.
- Fixed a bug that URI validators wrongly accepts non-ASCII characters
(9b8011f54dab3c2f8da78dc2251353453317d8af).
- Now they rejects non-ASCII characters correctly.
- Fixed a bug that abnormal URIs (such as
foo://orfoo:////) are wrongly rejected (7a40f4b72964d498970a356368dc320917d88e43).- Now they are accepted as valid IRIs.
- Documents are added to explain why they are valid.
- More tests are added to ensure invalid URIs/IRIs are rejected as expected (9b8011f54dab3c2f8da78dc2251353453317d8af).
IriReferenceStr::resolve()is renamed toresolve_against().- The old name will be kept until the next minor version bump to keep compatibility.
IriReferenceStr::resolve()is renamed toresolve_against()(4d64ee9884713644b69b8f227f32637d877a9d5f).resolve()was an ambiguous name, and people cannot know whichfoo.resolve(bar)means: "resolve foo against bar" or "foo resolves bar".- The new name
resolve_against()is more clear.foo.resolve_against(bar)can be natuarally interpreted as "resolve foo against bar". - The old name will be kept until the next minor version bump to keep compatibility.
*Str::new()methods are added.IriFragmentStr::from_prefixed()is added.types::CreationErroris renamed totypes::IriCreationError.- The old name will be kept until the next minor version bump to keep compatibility.
- Reduced indirect dependencies
*Str::new()methods are added (39c8f735ccf6f28aaf2f16dcdc579fb3838bb5fb).- Previously the string slices are created as
<&FooStr>::try_from(s)(wheres: &str), but this is redundant. NowFooStr::new(s)can be used instead of<&FooStr>::try_from(s)fors: &str.
- Previously the string slices are created as
IriFragmentStr::from_prefixed()is added (34cec2f422ba8046134668bdb662f69c9db7f52c).- This creates
IriFragmentStrfrom the given string with leading hash (#) character. For example,IriFragmentStr::from_prefixed("#foo")is same asIriFragmentStr::new("foo").
- This creates
types::CreationErroris renamed totypes::IriCreationError(c6e930608f158281d059e632ffc6117bddf18ebc, c0e650c5e19f1775cf82960afc9610994afba66e).- The old name will be kept until the next minor version bump to keep compatibility.
- Disabled
lexicalfeature ofnomcrate (a2d5bcd02e02e80af1c4fc8c14d768ca519ef467).- This reduces indirect dependencies.
- Migrate code generator from proc-macro crate to non-proc-macro one
(363337e720a9fdfa7e17153ffc63192bd49f7cc3).
- This reduces indirect dependencies, and may also reduce compilation time.
- Use nom 5.0.0.
- This is non-breaking change.
- Implement
CloneandCopyfor validation error types. - Let an error type contain source string for conversion from owned string.
- Add
shrink_to_fit()methods fortypes::iri::*Stringtypes. - Add
set_fragment()methods fortypes::iri::*Stringtypes (except forAbsoluteIriString). - Add
as_str()method fortypes::iri::*Strtypes. - Add
types::iri::IriFragment{Str,String}type. - Move
fragment()fromIriStrtoIriReferenceStr.
- Implement
CloneandCopyfor validation error types (validate::{iri,uri}::Error) (8c6af409963a).
- Add
shrink_to_fit()methods fortypes::iri::*Stringtypes (c8671876229f). - Add
set_fragment()methods fortypes::iri::*Stringtypes (except forAbsoluteIriString) (5ae09a327d93). - Add
as_str()method fortypes::iri::*Strtypes (0984140105a1). - Add
types::iri::IriFragment{Str,String}type (1c5e06192cf8).- This represents fragment part of an IRI.
types::iri::{AbsoluteIri,Iri,IriReference,RelativeIri}String::TryFrom<_>now returnstypes::iri::CreationErroras an error (8c6af409963a).CreationErrorowns the source data so that it is not lost on conversion failure.CreationError::into_source()returns the source data which cannot be converted into an IRI type.- Previously
validate::iri::Erroris used to represent error, but it does not own the source data.
- Move
fragment()fromIriStrtoIriReferenceStr(1c5e06192cf8).v.fragment()forv: &IriStris still available thanks toDeref.
Totally rewritten.