#[cfg(not(feature = "std"))]
use super::{io_copy as copy, io_empty as empty, io_repeat as repeat};
#[cfg(feature = "std")]
use crate::{
_dep::_std::io::{copy, empty, pipe, read_to_string, repeat, sink, stderr, stdin, stdout},
IoPipeReader, IoPipeWriter, IoSink, Stderr, Stdin, Stdout, String,
};
use crate::{IoEmpty, IoRead, IoRepeat, IoResult, IoWrite};
#[doc = crate::_tags!(io namespace)]
#[derive(Debug)]
pub struct Io;
#[rustfmt::skip]
impl Io {
#[cfg(not(feature = "std"))]
pub fn copy<R, W, const LEN: usize>(reader: &mut R, writer: &mut W) -> IoResult<u64>
where R: IoRead + ?Sized, W: IoWrite + ?Sized { copy::<R, W, LEN>(reader, writer) }
#[cfg(feature = "std")]
pub fn copy<R, W>(reader: &mut R, writer: &mut W) -> IoResult<u64>
where R: IoRead + ?Sized, W: IoWrite + ?Sized { copy(reader, writer) }
#[must_use]
pub const fn empty() -> IoEmpty { empty() }
#[must_use]
pub const fn repeat(byte: u8) -> IoRepeat { repeat(byte) }
}
#[rustfmt::skip]
#[cfg(feature = "std")]
#[cfg_attr(nightly_doc, doc(cfg(feature = "std")))]
impl Io {
pub fn pipe() -> IoResult<(IoPipeReader, IoPipeWriter)> { pipe() }
pub fn read_to_string<R: IoRead>(reader: R) -> IoResult<String> { read_to_string(reader) }
pub const fn sink() -> IoSink { sink() }
pub fn stderr() -> Stderr { stderr() }
pub fn stdin() -> Stdin { stdin() }
pub fn stdout() -> Stdout { stdout() }
}