#![allow(clippy::module_name_repetitions)]
use whichever_macros::dispatchable;
#[dispatchable(remote = ::core::fmt::Display)]
pub trait Display {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
}
#[dispatchable(remote = ::core::fmt::Debug)]
pub trait Debug {
fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result;
}
#[dispatchable(remote = ::core::error::Error)]
pub trait Error {
fn source(&self) -> ::core::option::Option<&(dyn ::core::error::Error + 'static)>;
}
#[dispatchable(remote = ::core::cmp::PartialEq)]
pub trait PartialEq {
#[dispatch(mismatch = false)]
fn eq(&self, other: &Self) -> bool;
#[dispatch(mismatch = true)]
fn ne(&self, other: &Self) -> bool;
}
#[dispatchable(remote = ::core::iter::Iterator)]
pub trait Iterator {
type Item;
fn next(&mut self) -> ::core::option::Option<Self::Item>;
fn size_hint(&self) -> (usize, ::core::option::Option<usize>);
fn count(self) -> usize
where
Self: Sized;
fn last(self) -> ::core::option::Option<Self::Item>
where
Self: Sized;
fn nth(&mut self, n: usize) -> ::core::option::Option<Self::Item>;
fn fold<B, F>(self, init: B, f: F) -> B
where
Self: Sized,
F: ::core::ops::FnMut(B, Self::Item) -> B;
}
#[dispatchable(remote = ::std::io::Read)]
pub trait Read {
fn read(&mut self, buf: &mut [u8]) -> ::std::io::Result<usize>;
fn read_vectored(&mut self, bufs: &mut [::std::io::IoSliceMut<'_>])
-> ::std::io::Result<usize>;
fn read_to_end(&mut self, buf: &mut ::std::vec::Vec<u8>) -> ::std::io::Result<usize>;
fn read_to_string(&mut self, buf: &mut ::std::string::String) -> ::std::io::Result<usize>;
fn read_exact(&mut self, buf: &mut [u8]) -> ::std::io::Result<()>;
}
#[dispatchable(remote = ::std::io::Write)]
pub trait Write {
fn write(&mut self, buf: &[u8]) -> ::std::io::Result<usize>;
fn write_vectored(&mut self, bufs: &[::std::io::IoSlice<'_>]) -> ::std::io::Result<usize>;
fn flush(&mut self) -> ::std::io::Result<()>;
fn write_all(&mut self, buf: &[u8]) -> ::std::io::Result<()>;
fn write_fmt(&mut self, fmt: ::core::fmt::Arguments<'_>) -> ::std::io::Result<()>;
}
#[dispatchable(remote = ::std::io::BufRead)]
pub trait BufRead {
fn fill_buf(&mut self) -> ::std::io::Result<&[u8]>;
fn consume(&mut self, amt: usize);
fn read_until(&mut self, byte: u8, buf: &mut ::std::vec::Vec<u8>) -> ::std::io::Result<usize>;
fn skip_until(&mut self, byte: u8) -> ::std::io::Result<usize>;
fn read_line(&mut self, buf: &mut ::std::string::String) -> ::std::io::Result<usize>;
}
#[dispatchable(remote = ::std::io::Seek)]
pub trait Seek {
fn seek(&mut self, pos: ::std::io::SeekFrom) -> ::std::io::Result<u64>;
fn rewind(&mut self) -> ::std::io::Result<()>;
fn stream_position(&mut self) -> ::std::io::Result<u64>;
fn seek_relative(&mut self, offset: i64) -> ::std::io::Result<()>;
}