Struct std::path::Display

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.


use std::path::Path;

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

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.

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.