facet_core/impls_std/
path.rs1use crate::*;
2
3unsafe impl Facet<'_> for std::path::PathBuf {
4 const SHAPE: &'static Shape = &const {
5 Shape::builder_for_sized::<Self>()
6 .vtable(value_vtable!(std::path::PathBuf, |f, _opts| write!(
7 f,
8 "{}",
9 Self::SHAPE.type_identifier
10 )))
11 .type_identifier("PathBuf")
12 .ty(Type::User(UserType::Opaque))
13 .def(Def::Scalar)
14 .build()
15 };
16}
17
18unsafe impl Facet<'_> for std::path::Path {
19 const SHAPE: &'static Shape = &const {
20 Shape::builder_for_unsized::<Self>()
21 .vtable(value_vtable!(std::path::Path, |f, _opts| write!(
22 f,
23 "{}",
24 Self::SHAPE.type_identifier
25 )))
26 .type_identifier("Path")
27 .ty(Type::User(UserType::Opaque))
28 .def(Def::Scalar)
29 .build()
30 };
31}