Struct std::path::Display1.0.0[][src]

pub struct Display<'a> { /* fields omitted */ }

Helper struct for safely printing paths with format! and {}.

A Path might contain non-Unicode data. This struct implements the Display trait in a way that mitigates that. It is created by the display method on Path. This may perform lossy conversion, depending on the platform. If you would like an implementation which escapes the path please use Debug instead.


use std::path::Path;

let path = Path::new("/tmp/");

println!("{}", path.display());

Trait Implementations

impl Debug for Display<'_>[src]

impl Display for Display<'_>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for Display<'a>

impl<'a> Send for Display<'a>

impl<'a> Sync for Display<'a>

impl<'a> Unpin for Display<'a>

impl<'a> UnwindSafe for Display<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized

impl<T> Borrow<T> for T where
    T: ?Sized

impl<T> BorrowMut<T> for T where
    T: ?Sized

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 

impl<T> ToString for T where
    T: Display + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.