Skip to main content

Crate msg_common

Crate msg_common 

Source
Expand description

Common utilities and types for msg-rs.

Modules§

constants
span

Structs§

Channel
A bounded, bi-directional channel for sending and receiving messages. Relies on Tokio’s mpsc channel.
JoinMap
A collection of keyed tasks spawned on a Tokio runtime. Hacky implementation of a join set that allows for a key to be associated with each task by having the task return a tuple of (key, value).

Traits§

IpAddrExt
Extension trait for IP addresses.
SocketAddrExt
Extension trait for SocketAddr.

Functions§

async_error
Wraps the given error in a boxed future.
channel
Creates a new channel with the given buffer size. This will return a tuple of 2 Channels, both of which can be used to send and receive messages.
unix_micros
Returns the current UNIX timestamp in microseconds.