My PGP key: 8771F89F6C5DDDE8080ACD1EE32F586BDAEC7370
.
yescallop / fluent-uri-rs Goto Github PK
View Code? Open in Web Editor NEWA full-featured URI reference handling library compliant with RFC 3986.
License: MIT License
A full-featured URI reference handling library compliant with RFC 3986.
License: MIT License
My PGP key: 8771F89F6C5DDDE8080ACD1EE32F586BDAEC7370
.
As is pointed out by its authors, RFC 6874 was a failure due to several problems with the text. To address these problems, the authors of RFC 6874 have published an Internet-Draft draft-ietf-6man-rfc6874bis-01 that aims to update RFC 3986 and obsolete RFC 6874. Therefore, it should be reasonable that we refrain from implementing RFC 6874 for now and wait until the Internet-Draft is published as an RFC.
Please add checked URI resolving
Hi,
I'd like to ask for a an improvement to fluent_uri::Uri
implemenation (as of version 0.2.0-alpha.3
published on crates.io).
There's two methods is_absolute_uri
and is_relative_uri
. How can I build a new URI based on an absolute and a relative URIs?
for example, I have an absolute URI foo://example.com/path/to/resource
and a relative URI other_resource
producing a result foo://example.com/path/to/other_resource
or with other relative URI ../../another/path
producing foo://example.com/another/path
?
I would love to be able to build a query by supplying a series of key-value pairs, and have the builder apply encoding to the keys and values as a browser would when handling a fields in a <form method="GET">
.
Elsewhere, the uri_builder
crate has a query(&str, &str)
method, but I don't believe it handles the encoding.
Taking the idea further, it would be amazing to be able to supply an implementation of serde::Serialize
and have that automatically serialised into a query with keys and values encoded. (But I can appreciate fluent-uri
might not want to depend on serde
, and Serialize
is significantly more complicated than an HTML form ๐.)
There is too much unsafe code in version 0.1
. It is nearly unmanageable. Yet it is not possible to forbid unsafe code because of Uri<&mut [u8]>
and Uri<String>::borrow
. At least we should reduce the amount of unsafe code to a minimum.
Thanks for picking up development of this library again!
I'm in a situation where I forced fluent_uri
some time ago to implement PartialEq
etc. for Uri<_>
. With your recent changes I'm almost able to use the upstream repository again.
One thing missing is uri.path().segments()
is guarded behind #[cfg(fluent_uri_unstable)]
. Do you have any plans on stabilising this or a similar method soon?
Another option might be getting rid of the custom cfg-attribute and putting it behind a unstable
feature.
Hiya!
From a quick cursory glance over the API of this crate it looks like it would be possible to support no_std
without too much trouble, mostly just cfging all std
uses with either core
or alloc
. Is this something you would be interested in? I could of course do so myself but thought I would ask first.
Supporting no_std
would allow this crate to be more easily used on more under-powered systems and make it a tad-bit smaller when compiling as well, which would be quite handy in my use-case.
ResolveErrorKind is important to decide what error has been occurred before displaying it. Developer should decide how to present it as their might include context, translate as their please and so on.
It seems this crate is almost completed, but i can't found it in crates.io and doc.rs, or it is called other name than fluent-uri
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.