pub struct TokioFileDescManagerEnv { /* private fields */ }Expand description
An environment implementation which manages opening, storing, and performing
async I/O operations on file descriptor handles via tokio.
Implementations§
Source§impl TokioFileDescManagerEnv
impl TokioFileDescManagerEnv
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new environment using specific opener/storer/async implementations.
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Constructs a new environment with no open file descriptors, but with a specified capacity for storing open file descriptors.
Sourcepub fn with_process_stdio() -> Result<Self>
pub fn with_process_stdio() -> Result<Self>
Constructs a new environment and initializes it with duplicated stdio file descriptors or handles of the current process.
Trait Implementations§
Source§impl AsyncIoEnvironment for TokioFileDescManagerEnv
impl AsyncIoEnvironment for TokioFileDescManagerEnv
Source§type IoHandle = Arc<FileDesc>
type IoHandle = Arc<FileDesc>
The underlying handle (e.g.
FileDesc) with which to perform the async I/O.Source§fn read_all(
&mut self,
fd: Self::IoHandle,
) -> BoxFuture<'static, Result<Vec<u8>>>
fn read_all( &mut self, fd: Self::IoHandle, ) -> BoxFuture<'static, Result<Vec<u8>>>
Asynchronously read all data from the specified handle.
Source§impl Clone for TokioFileDescManagerEnv
impl Clone for TokioFileDescManagerEnv
Source§fn clone(&self) -> TokioFileDescManagerEnv
fn clone(&self) -> TokioFileDescManagerEnv
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TokioFileDescManagerEnv
impl Debug for TokioFileDescManagerEnv
Source§impl Default for TokioFileDescManagerEnv
impl Default for TokioFileDescManagerEnv
Source§fn default() -> TokioFileDescManagerEnv
fn default() -> TokioFileDescManagerEnv
Returns the “default value” for a type. Read more
Source§impl FileDescEnvironment for TokioFileDescManagerEnv
impl FileDescEnvironment for TokioFileDescManagerEnv
Source§type FileHandle = Arc<FileDesc>
type FileHandle = Arc<FileDesc>
A file handle (or wrapper) to associate with shell file descriptors.
Source§fn file_desc(&self, fd: Fd) -> Option<(&Self::FileHandle, Permissions)>
fn file_desc(&self, fd: Fd) -> Option<(&Self::FileHandle, Permissions)>
Get the permissions and a handle associated with an opened file descriptor.
Source§fn set_file_desc(
&mut self,
fd: Fd,
handle: Self::FileHandle,
perms: Permissions,
)
fn set_file_desc( &mut self, fd: Fd, handle: Self::FileHandle, perms: Permissions, )
Associate a file descriptor with a given handle and permissions.
Source§fn close_file_desc(&mut self, fd: Fd)
fn close_file_desc(&mut self, fd: Fd)
Treat the specified file descriptor as closed for the current environment.
Source§impl FileDescOpener for TokioFileDescManagerEnv
impl FileDescOpener for TokioFileDescManagerEnv
Source§type OpenedFileHandle = Arc<FileDesc>
type OpenedFileHandle = Arc<FileDesc>
A type which represents an opened file descriptor.
Source§fn open_path(
&mut self,
path: &Path,
opts: &OpenOptions,
) -> Result<Self::OpenedFileHandle>
fn open_path( &mut self, path: &Path, opts: &OpenOptions, ) -> Result<Self::OpenedFileHandle>
Open a provided
path with the specified OpenOptions.Auto Trait Implementations§
impl Freeze for TokioFileDescManagerEnv
impl RefUnwindSafe for TokioFileDescManagerEnv
impl Send for TokioFileDescManagerEnv
impl Sync for TokioFileDescManagerEnv
impl Unpin for TokioFileDescManagerEnv
impl UnwindSafe for TokioFileDescManagerEnv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more