Skip to main content

StringConversion

Trait StringConversion 

Source
pub trait StringConversion {
    // Required methods
    fn normalized(&self) -> String;
    fn to_cross_platform_path(&self) -> String;
    fn file_name_with_parent(&self) -> String;
    fn to_absolute_path(&self) -> String;
}
Expand description

Trait for augmenting and formatting data for display

Required Methods§

Source

fn normalized(&self) -> String

Collapse whitespace and convert text to lowercase.

Source

fn to_cross_platform_path(&self) -> String

Render a path string using native separators without a Windows extended-length prefix

Source

fn file_name_with_parent(&self) -> String

Return a string representation of the file_name with its parent folder (or just the folder name if it is a folder)

Source

fn to_absolute_path(&self) -> String

Return a string representation of the absolute path

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl StringConversion for &str

Implementors§