Crate crust [] [src]

crust

Reliable peer-to-peer network connections in Rust with NAT traversal.

Structs

Config

Bootstrap config

ConnectionInfoResult

The result of a Service::prepare_contact_info call.

PeerId

An identifier of a peer node.

PrivConnectionInfo

Contact info generated by a call to Service::prepare_contact_info.

PubConnectionInfo

Contact info used to connect to another peer.

Service

A structure representing a connection manager. This is the main object through which crust is used.

Enums

CrustError

Crust's universal error type.

Event

Enum representing different events that will be sent over the asynchronous channel to the user of this module.

Constants

MSG_DROP_PRIORITY

Minimum priority for droppable messages. Messages with lower values will never be dropped.

Type Definitions

CrustEventSender

Used to receive events from a Service.

Priority

Priority of a message to be sent by Crust. A lower value means a higher priority, so Priority 0 is the highest one. Low-priority messages will be preempted if need be to allow higher priority messages through. Messages with a value >= MSG_DROP_PRIORITY will even be dropped, if bandwidth is insufficient.

Res

Crust's result type