Struct StandardStreamLock

pub struct StandardStreamLock<'a> { /* private fields */ }

StandardStreamLock is a locked reference to a StandardStream.

This implements the io::Write and WriteColor traits, and is constructed via the Write::lock method.

The lifetime 'a refers to the lifetime of the corresponding StandardStream.

Trait Implementations

impl<'a> Debug for StandardStreamLock<'a>

fn fmt(&self, f: &mut Formatter<'_>) -> Result

impl<'a> Write for StandardStreamLock<'a>

fn write(&mut self, b: &[u8]) -> Result<usize>
fn flush(&mut self) -> Result<()>

impl<'a> WriteColor for StandardStreamLock<'a>

fn supports_color(&self) -> bool
fn set_color(&mut self, spec: &ColorSpec) -> Result<()>
fn reset(&mut self) -> Result<()>
fn is_synchronous(&self) -> bool

Auto Trait Implementations

impl<'a> !Send for StandardStreamLock<'a>

impl<'a> !Sync for StandardStreamLock<'a>

impl<'a> Freeze for StandardStreamLock<'a>

impl<'a> RefUnwindSafe for StandardStreamLock<'a>

impl<'a> Unpin for StandardStreamLock<'a>

impl<'a> UnsafeUnpin for StandardStreamLock<'a>

impl<'a> UnwindSafe for StandardStreamLock<'a>

Blanket Implementations

impl<T> Any for StandardStreamLock<'a> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> Borrow<T> for StandardStreamLock<'a> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for StandardStreamLock<'a> where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for StandardStreamLock<'a>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, U> Into<U> for StandardStreamLock<'a> where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for StandardStreamLock<'a> where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for StandardStreamLock<'a> where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>