tokio_xattr/lib.rs
1#![deny(missing_docs, missing_debug_implementations)]
2#![doc(html_root_url = "https://docs.rs/tokio-xattr/0.2.0")]
3
4//! A pure-Rust library to manage extended attributes asynchronously.
5//!
6//! It provides support for manipulating extended attributes (xattrs)
7//! on modern Unix filesystems.
8//! See the attr(5) manpage for more details.
9//!
10//! This module uses tokio_threadpool to manage extended attributes
11//! asynchronously.
12
13mod xattr;
14
15pub use blocking_xattr::XAttrs;
16pub use xattr::{get, list, remove, set};
17
18use std::io;
19
20async fn asyncify<F, T>(f: F) -> io::Result<T>
21where
22 F: FnOnce() -> io::Result<T> + Send + 'static,
23 T: Send + 'static,
24{
25 tokio_executor::blocking::run(f).await
26}