// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License..

pub mod ffi;
pub mod fs;
pub mod io;
#[cfg(feature = "net")]
pub mod net;
pub mod raw;
#[cfg(feature = "thread")]
pub mod thread;

/// A prelude for conveniently writing platform-specific code.
///
/// Includes all extension traits, and some important type definitions.
pub mod prelude {
    pub use super::ffi::{OsStrExt, OsStringExt};
    pub use super::fs::DirEntryExt;
    pub use super::fs::FileExt;
    pub use super::fs::{FileTypeExt, MetadataExt, OpenOptionsExt, PermissionsExt};
    pub use super::io::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
    #[cfg(feature = "thread")]
    pub use super::thread::JoinHandleExt;
}