Skip to main content

Crate kimojio

Crate kimojio 

Source

Modules§

configuration
Configuration is used to configure the per thread behavior of the uring runtime.
io_type
operations
This file implements the futures that I/O and utility functionality for the uringruntime.
pipe
bipipe() returns a pair of read-write pipes where the read of one is connected to the write of the other.
socket_helpers
task
Task represents the per-task state. A Task is bound to a thread. Tasks can suspend and be woken up by I/O. There can be many pending futures per task.
task_pool
timer
tlscontext
TlsContext provides an option to create server context and then provides an asynchronous stream which implement TLS over the stream
tlsstream
TlsStream brings together uringtls library and an asynchronous stream to implement TLS over the stream.

Structs§

AsyncEvent
An event that can be used to suspend tasks until a condition occurs.
AsyncLock
An async-aware mutex for single-threaded, multi-task environments.
AsyncLockRef
A guard that provides exclusive access to the data protected by an AsyncLock.
AsyncReaderWriterLock
A reader-writer lock for single-threaded, multi-task environments.
AsyncSemaphore
A counting semaphore for limiting concurrent access to resources.
BufferPipe
A simple in-memory pipe implementation for testing purposes.
BufferReadStream
The read half of a BufferPipe after splitting.
BufferStream
A single-direction in-memory buffer stream.
BufferView
A PrefixBuffer implementation that wraps an existing slice without taking ownership of the underlying buffer
BufferWriteStream
The write half of a BufferPipe after splitting.
CanceledError
An error indicating an operation was canceled.
CancellationToken
CancellationToken can be used to track when an async operation should be cancelled.
Errno
errno—An error code.
EventEnvelope
A wrapper containing a trace event with context information.
HandleTable
A table that assigns unique indices to values for O(1) insertion and lookup.
Index
An index into a HandleTable.
MessagePipe
An in process pipe for sending messages of type T and receiving messages of type R. Can be used across threads but not between processes.
MessagePipeReceiver
MessagePipeSender
MutInPlaceCell
MutInPlaceCell is a zero overhead version of RefCell that requires you to make modifications from within a closure to avoid leaking references unsafely.
OpenRequest
OpenRequestHandlerImpl
OwnedBuffer
A PrefixBuffer that allocates a fixed size array on the heap
OwnedFd
An owned file descriptor.
OwnedFdStream
A stream wrapper around an owned file descriptor.
OwnedFdStreamRead
The read half of an OwnedFdStream after splitting.
OwnedFdStreamWrite
The write half of an OwnedFdStream after splitting.
Receiver
A receiver that can be used to receive messages from a channel.
ReceiverOneshot
ReceiverUnbounded
A receiver that can be used to receive messages from an unbounded channel.
Runtime
RuntimeHandle
RuntimeHandle is a handle to an instance of the async runtime that lets you spawn tasks on it from another thread. Use open_channel, open_channel_sync or uringtokio::UringRuntimeHandle::open_channel to create a channel to spawn tasks on the runtime. You will pass a closure that will receive values from the client thread but will be executed on the uringruntime thread. Call invoke on the resulting channel to schedule work on uringruntime and get the result.
Sender
A sender that can be used to send messages to a channel. If the sender is dropped, the channel will be closed.
SenderOneshot
SenderUnbounded
A sender that can be used to send messages to an unbounded channel. If the sender is dropped, the channel will be closed and any messages that are in the channel will be dropped.
StaticBuffer
A PrefixBuffer that store a fixed size array without allocating on the heap
URingStats
Per-thread statistics for the io_uring runtime.

Enums§

ChannelError
An error that is returned when attempting to receive a message from a channel that has been closed.
Events
Trace events emitted by the runtime for debugging and performance analysis.
RuntimeServerRequestEnvelope
TaskHandleError
An error from awaiting a task handle.
TimeoutError
An error indicating an operation timed out or was canceled.

Constants§

EAGAIN
EALREADY
EBADFD
EBUSY
EEXIST
EINTR
EINVAL
EIO
ENOENT
ENOTCONN
ENOTDIR
ENOTRECOVERABLE
ENOTSUP
EPERM
EPIPE
EPROTO
ESHUTDOWN
ETIMEDOUT
SIGINT
SIGTERM
S_IFDIR
S_IFLNK
S_IFMT
S_IFREG

Traits§

AsyncStreamRead
A trait for asynchronous reading from a stream.
AsyncStreamWrite
A trait for asynchronous writing to a stream.
PrefixBuffer
A buffer that can be prefixed with data. The primary use case is when you want to create a protocol stack where each layer can add additional data to the front of the buffer without having to allocate or copy memory.
SplittableStream
A trait for streams that can be split into separate read and write halves.
TraceConfiguration
A trait for receiving trace events from the runtime.

Functions§

async_channel
Creates a new channel. The channel can be used to send messages between tasks. Sending blocks until the message is received. The channel is closed when the sender is dropped or can be closed explicitly by the sender.
async_channel_unbounded
Creates a new unbounded channel. The channel can be used to send messages between tasks. Sending never blocks. The channel is closed when the sender is dropped or can be closed explicitly by the sender. Closing a channel drops any messages that are in the channel.
async_channel_unbounded_with_capacity
Creates a new unbounded channel with a specified capacity. The channel can be used to send messages between tasks. Sending never blocks. The channel is closed when the sender is dropped or can be closed explicitly by the sender. Closing a channel drops any messages that are in the channel.
create_open_request
fd is the one end of the pipe that uringruntime read and wite messages. f is the task that can be invoked multiple times on uringruntim.
errno_from_task_handle_result
This will propagate panics if the task panicked, and otherwise return Result<T, Errno>.
make_message_pipe
Create a pair of message pipes that can be used to send messages across threads within the same process.
make_message_pipe_oneway
Create a message pipe that can be used to send messages across threads within the same process.
make_message_pipe_oneway_sync
Create a message pipe that can be used to send messages across threads within the same process.
oneshot
A oneshot channel for sending a single value between tasks.
run
Runs the given future until completion using the default configuration. Returns None if shutdown_loop() is called. Returns Some(Err) if the future panics. Returns Some(Ok(Fut::Output)) if the future completes successfully.
run_test
Runs a test future with default configuration. For testing only.
run_test_with_handle
Runs a test future with a runtime handle and custom options. For testing only.
run_test_with_trace
Runs a test future with tracing enabled. For testing only.
run_with_configuration
Runs the given future until completion. Returns None if shutdown_loop() is called. Returns Some(Err) if the future panics. Returns Some(Ok(Fut::Output)) if the future completes successfully.
tls_version
Returns the OpenSSL version as a tuple of (major, minor, patch).
try_clone_owned_fd

Type Aliases§

c_int

Attribute Macros§

main
Marks an async main function to be run with the kimojio runtime.
test
Marks an async test to be run with the kimojio runtime.