std::path::Display

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]

Formats the value using the given formatter.

impl<'a> Display for Display<'a> [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

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部