1 use std::ffi::{OsStr, OsString};
2 use std::io;
3 use std::os::unix::io::RawFd;
4 use std::path::Path;
5 
6 use UnsupportedPlatformError;
7 
8 /// An iterator over a set of extended attributes names.
9 #[derive(Clone, Debug)]
10 pub struct XAttrs;
11 
12 impl Iterator for XAttrs {
13     type Item = OsString;
next(&mut self) -> Option<OsString>14     fn next(&mut self) -> Option<OsString> {
15         unreachable!("this should never exist")
16     }
17 
size_hint(&self) -> (usize, Option<usize>)18     fn size_hint(&self) -> (usize, Option<usize>) {
19         unreachable!("this should never exist")
20     }
21 }
22 
get_fd(_: RawFd, _: &OsStr) -> io::Result<Vec<u8>>23 pub fn get_fd(_: RawFd, _: &OsStr) -> io::Result<Vec<u8>> {
24     Err(io::Error::new(
25         io::ErrorKind::Other,
26         UnsupportedPlatformError,
27     ))
28 }
29 
set_fd(_: RawFd, _: &OsStr, _: &[u8]) -> io::Result<()>30 pub fn set_fd(_: RawFd, _: &OsStr, _: &[u8]) -> io::Result<()> {
31     Err(io::Error::new(
32         io::ErrorKind::Other,
33         UnsupportedPlatformError,
34     ))
35 }
36 
remove_fd(_: RawFd, _: &OsStr) -> io::Result<()>37 pub fn remove_fd(_: RawFd, _: &OsStr) -> io::Result<()> {
38     Err(io::Error::new(
39         io::ErrorKind::Other,
40         UnsupportedPlatformError,
41     ))
42 }
43 
list_fd(_: RawFd) -> io::Result<XAttrs>44 pub fn list_fd(_: RawFd) -> io::Result<XAttrs> {
45     Err(io::Error::new(
46         io::ErrorKind::Other,
47         UnsupportedPlatformError,
48     ))
49 }
50 
get_path(_: &Path, _: &OsStr) -> io::Result<Vec<u8>>51 pub fn get_path(_: &Path, _: &OsStr) -> io::Result<Vec<u8>> {
52     Err(io::Error::new(
53         io::ErrorKind::Other,
54         UnsupportedPlatformError,
55     ))
56 }
57 
set_path(_: &Path, _: &OsStr, _: &[u8]) -> io::Result<()>58 pub fn set_path(_: &Path, _: &OsStr, _: &[u8]) -> io::Result<()> {
59     Err(io::Error::new(
60         io::ErrorKind::Other,
61         UnsupportedPlatformError,
62     ))
63 }
64 
remove_path(_: &Path, _: &OsStr) -> io::Result<()>65 pub fn remove_path(_: &Path, _: &OsStr) -> io::Result<()> {
66     Err(io::Error::new(
67         io::ErrorKind::Other,
68         UnsupportedPlatformError,
69     ))
70 }
71 
list_path(_: &Path) -> io::Result<XAttrs>72 pub fn list_path(_: &Path) -> io::Result<XAttrs> {
73     Err(io::Error::new(
74         io::ErrorKind::Other,
75         UnsupportedPlatformError,
76     ))
77 }
78