use crate::prelude::*;
pub fn make_file_path_segment<'a, T: Into<Cow<'a, str>>>(value: T) -> (bool, Cow<'a, str>) {
percent_encode(value, &PATH_SEGMENT)
}
pub fn make_file_path_segment_bytes<'a, T: Into<Cow<'a, [u8]>>>(value: T) -> (bool, Cow<'a, str>) {
percent_encode_bytes(value, &PATH_SEGMENT)
}
pub fn special_not_file_path_segment_to_file_path_segment<'a, T: Into<Cow<'a, str>>>(value: T) -> (bool, Cow<'a, str>) {
(false, value.into())
}
pub fn non_special_path_segment_to_file_path_segment<'a, T: Into<Cow<'a, str>>>(value: T) -> (bool, Cow<'a, str>) {
let (a, value) = non_special_path_segment_to_special_not_file_path_segment(value);
let (b, value) = special_not_file_path_segment_to_file_path_segment (value);
(a || b, value)
}