W3cubDocs

/Rust

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.

Examples

use std::path::Path;

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

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

Trait Implementations

impl<'a> Debug for Display<'a> [src]

[src]

Formats the value using the given formatter. Read more

impl<'a> Display for Display<'a> [src]

[src]

Formats the value using the given formatter. Read more

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/path/struct.Display.html