use std::path::PathBuf;
use crate::impl_sugar_path::{
normalize_owned_path_buf, path_buf_into_slash, path_buf_into_slash_lossy, try_path_buf_into_slash,
};
mod private {
use std::path::PathBuf;
pub trait Sealed {}
impl Sealed for PathBuf {}
}
pub trait SugarPathBuf: private::Sealed {
#[must_use]
fn into_normalized(self) -> PathBuf;
#[must_use]
fn into_slash(self) -> String;
fn try_into_slash(self) -> Result<String, PathBuf>;
#[must_use]
fn into_slash_lossy(self) -> String;
}
impl SugarPathBuf for PathBuf {
fn into_normalized(self) -> PathBuf {
normalize_owned_path_buf(self)
}
fn into_slash(self) -> String {
path_buf_into_slash(self)
}
fn try_into_slash(self) -> Result<String, PathBuf> {
try_path_buf_into_slash(self)
}
fn into_slash_lossy(self) -> String {
path_buf_into_slash_lossy(self)
}
}