Trait conch_runtime::env::FileDescEnvironment
[−]
[src]
pub trait FileDescEnvironment { type FileHandle; fn file_desc(&self, fd: Fd) -> Option<(&Self::FileHandle, Permissions)>; fn set_file_desc(
&mut self,
fd: Fd,
handle: Self::FileHandle,
perms: Permissions
); fn close_file_desc(&mut self, fd: Fd); }
An interface for setting and getting shell file descriptors.
Associated Types
type FileHandle
A file handle (or wrapper) to associate with shell file descriptors.
Required Methods
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
)
&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)
Treat the specified file descriptor as closed for the current environment.
Implementations on Foreign Types
impl<'a, T: ?Sized + FileDescEnvironment> FileDescEnvironment for &'a mut T
[src]
type FileHandle = T::FileHandle
fn file_desc(&self, fd: Fd) -> Option<(&Self::FileHandle, Permissions)>
[src]
fn set_file_desc(
&mut self,
fd: Fd,
handle: Self::FileHandle,
perms: Permissions
)
[src]
&mut self,
fd: Fd,
handle: Self::FileHandle,
perms: Permissions
)
fn close_file_desc(&mut self, fd: Fd)
[src]
Implementors
impl<A, IO, FD, L, V, EX, WD, N, ERR> FileDescEnvironment for Env<A, IO, FD, L, V, EX, WD, N, ERR> where
FD: FileDescEnvironment,
N: Hash + Eq, type FileHandle = FD::FileHandle;impl<A, IO, FD, L, V, EX, WD, N, ERR> FileDescEnvironment for AtomicEnv<A, IO, FD, L, V, EX, WD, N, ERR> where
FD: FileDescEnvironment,
N: Hash + Eq, type FileHandle = FD::FileHandle;impl<T: Clone + Eq> FileDescEnvironment for FileDescEnv<T> type FileHandle = T;
impl<T: Clone + Eq> FileDescEnvironment for AtomicFileDescEnv<T> type FileHandle = T;