Struct PtyMaster
pub struct PtyMaster(/* private field */);
Representation of the Master device in a master/slave pty pair
While this datatype is a thin wrapper around OwnedFd, it enforces that the available PTY
functions are given the correct file descriptor.
Implementations
impl PtyMaster
unsafe fn from_owned_fd(fd: OwnedFd) -> SelfConstructs a
PytMasterwrapping an existingOwnedFd.Safety
OwnedFdis a validPtyMaster.
Trait Implementations
impl AsFd for PtyMaster
fn as_fd(&self) -> BorrowedFd<'_>
impl AsRawFd for PtyMaster
fn as_raw_fd(&self) -> RawFd
impl Debug for PtyMaster
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl IntoRawFd for PtyMaster
fn into_raw_fd(self) -> RawFd
impl Read for PtyMaster
fn read(&mut self, buf: &mut [u8]) -> Result<usize>
impl Write for PtyMaster
fn write(&mut self, buf: &[u8]) -> Result<usize>fn flush(&mut self) -> Result<()>
Auto Trait Implementations
impl Freeze for PtyMaster
impl RefUnwindSafe for PtyMaster
impl Send for PtyMaster
impl Sync for PtyMaster
impl Unpin for PtyMaster
impl UnsafeUnpin for PtyMaster
impl UnwindSafe for PtyMaster
Blanket Implementations
impl<T> Any for PtyMaster
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for PtyMaster
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for PtyMaster
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for PtyMaster
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for PtyMaster
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for PtyMaster
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for PtyMaster
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>