Skip to main content

Crate libmsg

Crate libmsg 

Source

Modules§

backoff
compression
hooks
Connection hooks for customizing connection establishment.
ipc
state
stats
tcp

Structs§

Acceptor
An await-friendly interface for accepting inbound connections.
ConnOptions
Options for the connection manager.
ExponentialBackoff
A stream that yields exponentially increasing backoff durations.
MeteredIo
A wrapper around an Io object that records and provides transport-specific metrics. The link with the transport-specific metrics is achieved by the S type parameter, which must implement the TryFrom<&Io> trait.
PubMessage
A message received from a publisher. Includes the source, topic, and payload.
PubOptions
PubSocket
A publisher socket. This is thread-safe and can be cloned.
RepOptions
The reply socket options.
RepSocket
A reply socket. This socket implements Stream and yields incoming Requests.
ReqMessage
A message sent from a ReqSocket to the backend task.
ReqOptions
The request socket options.
ReqSocket
The request socket.
Request
A request received by the socket.
RequestId
A request Identifier.
SendCommand
A command to send a request message and wait for a response.
SubOptions
SubSocket
A subscriber socket. This socket implements Stream and yields incoming PubMessages.

Enums§

ConnectionState
Abstraction to represent the state of a connection.
HookError
Error type for connection hooks.
Profile
The performance profile to tune socket options for.
PubError
Errors that can occur when using a publisher socket.
RepError
Errors that can occur when using a reply socket.
ReqError
Errors that can occur when using a request socket.
SubError
Errors that can occur when using a subscriber socket.

Constants§

DEFAULT_BUFFER_SIZE
The default buffer size for a socket.
DEFAULT_QUEUE_SIZE
The default queue size for a channel.

Traits§

Address
A trait for address types that can be used by any transport.
Backoff
Helper trait alias for backoff streams. We define any stream that yields Durations as a backoff
ConnectionHook
Connection hook executed during connection establishment.
PeerAddress
Trait for connection types that can return their peer address.
Transport
A transport provides connection-oriented communication between two peers through ordered and reliable streams of bytes.
TransportExt
Extension trait for transports that provides additional methods.

Type Aliases§

HookResult
Result type for connection hooks.