Skip to main content

Master

Struct Master 

Source
pub struct Master { /* private fields */ }
Expand description

A PTY master over a descriptor this process owns.

Implementations§

Source§

impl Master

Source

pub fn new(file: File) -> Self

Source

pub fn get_size(&self) -> Result<WinSize>

The size the terminal last had.

§Errors

The descriptor is not a PTY, or the OS refused the call.

Source

pub fn resize(&self, size: WinSize) -> Result<()>

Resize the terminal, so its guest reflows.

§Errors

The descriptor is not a PTY, or the OS refused the call.

Source

pub fn process_group_leader(&self) -> Option<i32>

The process group the guest leads, when it leads one.

Source

pub fn raw_fd(&self) -> RawFd

Source

pub fn try_clone(&self) -> Result<File>

Another handle on the same master.

§Errors

The OS refused to duplicate it.

Trait Implementations§

Source§

impl Debug for Master

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Forget for Master

§

impl Freeze for Master

§

impl Move for Master

§

impl RefUnwindSafe for Master

§

impl Send for Master

§

impl Sync for Master

§

impl Unpin for Master

§

impl UnsafeUnpin for Master

§

impl UnwindSafe for Master

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.