Module uri
Available on crate feature
http only.Expand description
HTTP URI types — re-exported from the native rama_net::uri implementation.
rama_http_types::Uri IS rama_net::uri::Uri: a single, RFC-3986-complete
URI type shared across the whole stack, replacing the previous http crate
re-export.
Modules§
- util
- Preserved utility submodule (re-exports the
percent_encodingcrate).
Structs§
- Fragment
- Owned fragment component (the part after
#, sans the#itself). - Fragment
Ref - Borrowed view of a URI fragment component (no leading
#). - Path
Match Options - Options controlling path prefix/suffix matching and stripping
(
PathRef::has_prefix_with_opts,super::PathMut::strip_prefix_with_opts, …). - PathMut
- Mutable view of a
Uri’s path component. - PathRef
- Borrowed view of a URI path.
- Path
Segment - One segment in a URI path — the bytes between two
/separators (or between a/and the end of the path). - Path
Segments - Iterator over the segments of a URI path. Created by
PathRef::segments. - Query
- Owned query component. Cheaply mutable in-place via the
QueryMutRAII guard. - Query
Deserialize Error - Returned by
QueryRef::deserialize/Query::deserializewhen the query string cannot be converted into the target type — type mismatch, missing required field, malformed encoding, or an escaped value being fed into a non-owning&strfield. - Query
Drain - Iterator yielding owned
QueryPairs drained from aQueryMut. Created byQueryMut::drain. - Query
Mut - Mutable view of a
Uri’s query component. - Query
Pair - One owned
name[=value]pair, cheap to clone. Produced byQueryMut::popandQueryMut::drain— popping a pair off a query doesn’t copy the byte content (the buffer is refcount-shared with the source). - Query
Pair Ref - Borrowed
name[=value]pair view. Yielded byQueryRef::pairs/Query::pairs. - Query
Pairs - Iterator over the
name[=value]pairs of a URI query string. Created byQueryRef::pairs/Query::pairs. - Query
Ref - Borrowed view of a URI query component (no leading
?). - Uri
- First-class URI value.
- UriRef
- Borrowed snapshot of a
Uri’s components.
Enums§
- Component
- Which URI component a
ParseErrororUriErrorrefers to. - Parse
Error - Reasons parsing a byte string into a
Urican fail. - Resolve
Error - Errors from
Uri::resolve/Uri::resolve_strict. - UriError
- Reasons an operation on an already-parsed
Urican fail. - Wire
Error - Error returned when a wire-form contract can’t be honoured.
Traits§
- Into
UriComponent - Sealed marker — types accepted by URI component setters.
- Into
UriInput - Marker trait for inputs accepted by
Uri::parseandUri::parse_strict.
Functions§
- try_
to_ strip_ path_ prefix_ from_ uri - Strip
prefixfrom the path ofuri, returning a newUriwith the prefix removed (re-rooted at/). Matching is ASCII-case-insensitive on the raw path bytes, mirroring nested-router prefix stripping.