Struct otter_api_tests::io::Stdout 1.0.0[−][src]
pub struct Stdout { /* fields omitted */ }
A handle to the global standard output stream of the current process.
Each handle shares a global buffer of data to be written to the standard
output stream. Access is also synchronized via a lock and explicit control
over locking is available via the lock
method.
Created by the io::stdout
method.
Note: Windows Portability Consideration
When operating in a console, the Windows implementation of this stream does not support non-UTF-8 byte sequences. Attempting to write bytes that are not valid UTF-8 will return an error.
Implementations
impl Stdout
[src]
pub fn lock(&self) -> StdoutLock<'_>ⓘNotable traits for StdoutLock<'_>
impl<'_> Write for StdoutLock<'_>
[src]
Notable traits for StdoutLock<'_>
impl<'_> Write for StdoutLock<'_>
Locks this handle to the standard output stream, returning a writable guard.
The lock is released when the returned lock goes out of scope. The
returned guard also implements the Write
trait for writing data.
Examples
use std::io::{self, Write}; fn main() -> io::Result<()> { let stdout = io::stdout(); let mut handle = stdout.lock(); handle.write_all(b"hello world")?; Ok(()) }
Trait Implementations
impl AsRawFd for Stdout
1.21.0[src]
impl Debug for Stdout
1.16.0[src]
impl<'_> Write for &'_ Stdout
1.48.0[src]
pub fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
[src]
pub fn is_write_vectored(&self) -> bool
[src]
pub fn flush(&mut self) -> Result<(), Error>
[src]
pub fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
[src]
pub fn write_all_vectored(
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
[src]
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
pub fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>
[src]
pub fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
impl Write for Stdout
[src]
pub fn write(&mut self, buf: &[u8]) -> Result<usize, Error>
[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
[src]
pub fn is_write_vectored(&self) -> bool
[src]
pub fn flush(&mut self) -> Result<(), Error>
[src]
pub fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
[src]
pub fn write_all_vectored(
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
[src]
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
pub fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>
[src]
pub fn by_ref(&mut self) -> &mut SelfⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
Auto Trait Implementations
impl RefUnwindSafe for Stdout
impl Send for Stdout
impl Sync for Stdout
impl Unpin for Stdout
impl UnwindSafe for Stdout
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow(&self) -> &TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut TⓘNotable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
[src]
Notable traits for &'_ mut R
impl<'_, R> Read for &'_ mut R where
R: Read + ?Sized, impl<'_, W> Write for &'_ mut W where
W: Write + ?Sized, impl<'_, I> Iterator for &'_ mut I where
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;
impl<T> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>ⓘNotable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
Notable traits for Box<R, Global>
impl<R> Read for Box<R, Global> where
R: Read + ?Sized, impl<W> Write for Box<W, Global> where
W: Write + ?Sized, impl<F, A> Future for Box<F, A> where
A: Allocator + 'static,
F: Future + Unpin + ?Sized, type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
A: Allocator,
I: Iterator + ?Sized, type Item = <I as Iterator>::Item;
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> DowncastSync for T where
T: Any + Send + Sync,
T: Any + Send + Sync,
impl<A> DynCastExt for A
pub fn dyn_cast<T>(
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>,
self
) -> Result<<A as DynCastExtHelper<T>>::Target, <A as DynCastExtHelper<T>>::Source> where
T: ?Sized,
A: DynCastExtHelper<T>,
pub fn dyn_upcast<T>(self) -> <A as DynCastExtAdvHelper<T, T>>::Target where
T: ?Sized,
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>,
T: ?Sized,
A: DynCastExtAdvHelper<T, T, Source = <A as DynCastExtAdvHelper<T, T>>::Target>,
pub fn dyn_cast_adv<F, T>(
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
T: ?Sized,
A: DynCastExtAdvHelper<F, T>,
F: ?Sized,
self
) -> Result<<A as DynCastExtAdvHelper<F, T>>::Target, <A as DynCastExtAdvHelper<F, T>>::Source> where
T: ?Sized,
A: DynCastExtAdvHelper<F, T>,
F: ?Sized,
pub fn dyn_cast_with_config<C>(
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>,
self
) -> Result<<A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Target, <A as DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>>::Source> where
C: DynCastConfig,
A: DynCastExtAdvHelper<<C as DynCastConfig>::Source, <C as DynCastConfig>::Target>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<W> WriteBytesExt for W where
W: Write + ?Sized,
W: Write + ?Sized,
pub fn write_u8(&mut self, n: u8) -> Result<(), Error>
pub fn write_i8(&mut self, n: i8) -> Result<(), Error>
pub fn write_u16<T>(&mut self, n: u16) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_i16<T>(&mut self, n: i16) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_u24<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_i24<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_u32<T>(&mut self, n: u32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_i32<T>(&mut self, n: i32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_u48<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_i48<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_u64<T>(&mut self, n: u64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_i64<T>(&mut self, n: i64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_u128<T>(&mut self, n: u128) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_i128<T>(&mut self, n: i128) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_uint<T>(&mut self, n: u64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_int<T>(&mut self, n: i64, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_uint128<T>(&mut self, n: u128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_int128<T>(&mut self, n: i128, nbytes: usize) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_f32<T>(&mut self, n: f32) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,
pub fn write_f64<T>(&mut self, n: f64) -> Result<(), Error> where
T: ByteOrder,
T: ByteOrder,