Crate crust[][src]

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

Structs

Config

Crust configuration settings

ConnectionInfoResult

The result of a Service::prepare_contact_info call.

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 all the Crust services. This is the main object through which crust is used.

Enums

CrustError

Crust's universal error type.

CrustUser

Specify crust user. Behaviour (for example in bootstrap phase) will be different for different variants. Node will request the Bootstrapee to connect back to this crust failing which it would mean it's not reachable from outside and hence should be rejected bootstrap attempts.

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.

Traits

Uid

Trait for specifying a unique identifier for a Crust peer

Functions

read_config_file

Reads the default crust config file.

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