[−][src]Struct futures::io::AllowStdIo
A simple wrapper type which allows types which implement only
implement std::io::Read
or std::io::Write
to be used in contexts which expect an AsyncRead
or AsyncWrite
.
If these types issue an error with the kind io::ErrorKind::WouldBlock
,
it is expected that they will notify the current task on readiness.
Synchronous std
types should not issue errors of this kind and
are safe to use in this context. However, using these types with
AllowStdIo
will cause the event loop to block, so they should be used
with care.
Methods
impl<T> AllowStdIo<T>
[src][−]
ⓘImportant traits for AllowStdIo<T>pub fn new(io: T) -> AllowStdIo<T>
[src][−]
ⓘImportant traits for AllowStdIo<T>
Creates a new AllowStdIo
from an existing IO object.
ⓘImportant traits for &'_ mut Fpub fn get_ref(&self) -> &T
[src][−]
ⓘImportant traits for &'_ mut F
Returns a reference to the contained IO object.
ⓘImportant traits for &'_ mut Fpub fn get_mut(&mut self) -> &mut T
[src][−]
ⓘImportant traits for &'_ mut F
Returns a mutable reference to the contained IO object.
pub fn into_inner(self) -> T
[src][−]
Consumes self and returns the contained IO object.
Trait Implementations
impl<T> Unpin for AllowStdIo<T>
[src]
impl<T> Eq for AllowStdIo<T> where
T: Eq,
[src]
T: Eq,
impl<T> AsyncSeek for AllowStdIo<T> where
T: Seek,
[src][+]
T: Seek,
impl<T> Debug for AllowStdIo<T> where
T: Debug,
[src][+]
T: Debug,
impl<T> StructuralPartialEq for AllowStdIo<T>
[src]
impl<T> Read for AllowStdIo<T> where
T: Read,
[src][+]
T: Read,
impl<T> Hash for AllowStdIo<T> where
T: Hash,
[src][+]
T: Hash,
impl<T> PartialEq<AllowStdIo<T>> for AllowStdIo<T> where
T: PartialEq<T>,
[src][+]
T: PartialEq<T>,
impl<T> Clone for AllowStdIo<T> where
T: Clone,
[src][+]
T: Clone,
impl<T> AsyncWrite for AllowStdIo<T> where
T: Write,
[src][+]
T: Write,
impl<T> AsyncRead for AllowStdIo<T> where
T: Read,
[src][+]
T: Read,
impl<T> PartialOrd<AllowStdIo<T>> for AllowStdIo<T> where
T: PartialOrd<T>,
[src][+]
T: PartialOrd<T>,
impl<T> Ord for AllowStdIo<T> where
T: Ord,
[src][+]
T: Ord,
impl<T> Write for AllowStdIo<T> where
T: Write,
[src][+]
T: Write,
impl<T> StructuralEq for AllowStdIo<T>
[src]
impl<T> AsyncBufRead for AllowStdIo<T> where
T: BufRead,
[src][+]
T: BufRead,
impl<T> Copy for AllowStdIo<T> where
T: Copy,
[src]
T: Copy,
impl<T> Seek for AllowStdIo<T> where
T: Seek,
[src][+]
T: Seek,
impl<T> BufRead for AllowStdIo<T> where
T: BufRead,
[src][+]
T: BufRead,
Auto Trait Implementations
impl<T> Send for AllowStdIo<T> where
T: Send,
T: Send,
impl<T> Sync for AllowStdIo<T> where
T: Sync,
T: Sync,
impl<T> UnwindSafe for AllowStdIo<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for AllowStdIo<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> From<T> for T
[src][+]
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<R> AsyncReadExt for R where
R: AsyncRead + ?Sized,
[src][+]
R: AsyncRead + ?Sized,
impl<W> AsyncWriteExt for W where
W: AsyncWrite + ?Sized,
[src][+]
W: AsyncWrite + ?Sized,
impl<S> AsyncSeekExt for S where
S: AsyncSeek + ?Sized,
[src][+]
S: AsyncSeek + ?Sized,
impl<R> AsyncBufReadExt for R where
R: AsyncBufRead + ?Sized,
[src][+]
R: AsyncBufRead + ?Sized,