Skip to main content

Crate driver

Crate driver 

Source
Expand description

Platform-specific drivers.

Some types differ by compilation target.

Modules§

op
The async operations.

Structs§

AsyncifyPool
A thread pool to perform blocking operations in other threads.
BoxAllocator
Default implementation of BufferAllocator.
BufferPool
A buffer pool.
BufferRef
A unique reference to a buffer within the buffer pool.
Cancel
A type-erased cancel token.
DispatchError
An error that may be emitted when all worker threads are busy.
Extra
Platform-specific extra data associated with a driver instance.
Key
A typed wrapper for key of Ops submitted into driver.
Overlapped
The overlapped struct we actually used for IOCP.
Proactor
Low-level actions of completion-based IO. It owns the operations to keep the driver safe.
ProactorBuilder
Builder for Proactor.
SharedFd
A shared fd. It is passed to the operations to make sure the fd won’t be closed before the operations complete.

Enums§

BorrowedFd
Borrowed handle or socket on Windows.
DriverType
Representing underlying driver type the fusion driver is using
OpType
Operation type.
OwnedFd
Owned handle or socket on Windows.
PushEntry
The return type of Proactor::push.

Traits§

AsFd
Extracts fds.
AsRawFd
Extracts raw fds.
BufferAllocator
Trait used to allocate buffers for compio-driver’s buffer pool.
Dispatchable
A trait for dispatching a closure.
ErrorExt
Extension trait for io::Error and results with it.
FromRawFd
Constructs I/O objects from raw handles.
IntoRawFd
A trait to express the ability to consume an object and acquire ownership of its raw HANDLE.
OpCode
Abstraction of IOCP operations.
ResultTakeBuffer
Helper trait for taking buffer from a BufResult.
TakeBuffer
Take buffer out of an operation.
ToSharedFd
Get a clone of SharedFd.

Type Aliases§

RawFd
On windows, handle and socket are in the same size. Both of them could be attached to an IOCP. Therefore, both could be seen as fd.