[][src]Struct coreutils_core::os::tty::TTYName

pub struct TTYName(_);

A struct that holds the name of a TTY with a Display trait implementation to be easy to print.

Methods

impl TTYName[src]

pub fn new(file_descriptor: &impl AsRawFd) -> Result<Self, Error>[src]

Create a TTYName from a file_descriptor

Errors

It returns a error variant when file_descriptor is not a TTY.

pub fn as_bstr(&self) -> &BStr[src]

Extracts a bstring slice containing the entire BString.

pub fn to_bstring(&self) -> BString[src]

Return a clone of the tty name.

Trait Implementations

impl Clone for TTYName[src]

impl Debug for TTYName[src]

impl Display for TTYName[src]

impl Eq for TTYName[src]

impl Hash for TTYName[src]

impl Ord for TTYName[src]

impl PartialEq<TTYName> for TTYName[src]

impl PartialOrd<TTYName> for TTYName[src]

impl StructuralEq for TTYName[src]

impl StructuralPartialEq for TTYName[src]

Auto Trait Implementations

impl RefUnwindSafe for TTYName

impl Send for TTYName

impl Sync for TTYName

impl Unpin for TTYName

impl UnwindSafe for TTYName

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.