better-url 0.12.0

A better URL crate.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
//! [`NonSpecialPathSegment`].

use crate::prelude::*;

/// Encode a [`NonSpecialPathSegment`].
pub fn make_non_special_path_segment<'a, T: Into<Cow<'a, str>>>(value: T) -> (bool, Cow<'a, str>) {
    percent_encode(value, &PATH_SEGMENT)
}

/// Encode a [`NonSpecialPathSegment`] from bytes.
pub fn make_non_special_path_segment_bytes<'a, T: Into<Cow<'a, [u8]>>>(value: T) -> (bool, Cow<'a, str>) {
    percent_encode_bytes(value, &PATH_SEGMENT)
}