Struct conch_runtime::env::FileDescEnv [−][src]
pub struct FileDescEnv<T> { /* fields omitted */ }An environment module for setting and getting shell file descriptors.
Uses Rc internally. For a possible Send and Sync implementation,
see env::atomic::FileDescEnv.
Methods
impl<T> FileDescEnv<T>[src]
impl<T> FileDescEnv<T>pub fn new() -> Self[src]
pub fn new() -> SelfConstructs a new environment with no open file descriptors.
pub fn with_process_stdio() -> Result<Self> where
T: From<FileDesc>, [src]
pub fn with_process_stdio() -> Result<Self> where
T: From<FileDesc>, Constructs a new environment and initializes it with duplicated stdio file descriptors or handles of the current process.
pub fn with_fds<I: IntoIterator<Item = (Fd, T, Permissions)>>(iter: I) -> Self[src]
pub fn with_fds<I: IntoIterator<Item = (Fd, T, Permissions)>>(iter: I) -> SelfConstructs a new environment with a provided collection of provided
file descriptors in the form (shell_fd, handle, permissions).
Trait Implementations
impl<T: PartialEq> PartialEq for FileDescEnv<T>[src]
impl<T: PartialEq> PartialEq for FileDescEnv<T>fn eq(&self, other: &FileDescEnv<T>) -> bool[src]
fn eq(&self, other: &FileDescEnv<T>) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &FileDescEnv<T>) -> bool[src]
fn ne(&self, other: &FileDescEnv<T>) -> boolThis method tests for !=.
impl<T: Eq> Eq for FileDescEnv<T>[src]
impl<T: Eq> Eq for FileDescEnv<T>impl<T: Debug> Debug for FileDescEnv<T>[src]
impl<T: Debug> Debug for FileDescEnv<T>fn fmt(&self, fmt: &mut Formatter) -> Result[src]
fn fmt(&self, fmt: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T> Default for FileDescEnv<T>[src]
impl<T> Default for FileDescEnv<T>impl<T> Clone for FileDescEnv<T>[src]
impl<T> Clone for FileDescEnv<T>fn clone(&self) -> Self[src]
fn clone(&self) -> SelfReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<T> SubEnvironment for FileDescEnv<T>[src]
impl<T> SubEnvironment for FileDescEnv<T>fn sub_env(&self) -> Self[src]
fn sub_env(&self) -> SelfCreate a new sub-environment, which starts out idential to its parent, but any changes on the new environment will not be reflected on the parent. Read more
impl<T: Clone + Eq> FileDescEnvironment for FileDescEnv<T>[src]
impl<T: Clone + Eq> FileDescEnvironment for FileDescEnv<T>type FileHandle = T
A file handle (or wrapper) to associate with shell file descriptors.
fn file_desc(&self, fd: Fd) -> Option<(&Self::FileHandle, Permissions)>[src]
fn file_desc(&self, fd: Fd) -> Option<(&Self::FileHandle, Permissions)>Get the permissions and a handle associated with an opened file descriptor.
fn set_file_desc(
&mut self,
fd: Fd,
handle: Self::FileHandle,
perms: Permissions
)[src]
fn set_file_desc(
&mut self,
fd: Fd,
handle: Self::FileHandle,
perms: Permissions
)Associate a file descriptor with a given handle and permissions.
fn close_file_desc(&mut self, fd: Fd)[src]
fn close_file_desc(&mut self, fd: Fd)Treat the specified file descriptor as closed for the current environment.
Auto Trait Implementations
impl<T> !Send for FileDescEnv<T>
impl<T> !Send for FileDescEnv<T>impl<T> !Sync for FileDescEnv<T>
impl<T> !Sync for FileDescEnv<T>