Module rings_node::prelude

source ·
Expand description

A prelude is provided which imports all the important data types and traits of ring-network.

Re-exports

pub use jsonrpc_core;
pub use reqwest;
pub use rings_core;
pub use self::rings_core::prelude::base58;
pub use self::rings_core::prelude::uuid;
pub use self::rings_core::prelude::web3;
pub use crate::jsonrpc_client;

Modules

A Framing and Message chucking implementation defined in RFC4917https://www.rfc-editor.org/rfc/rfc4975#page-9 This chunking mechanism allows a sender to interrupt a chunk part of the way through sending it. The ability to interrupt messages allows multiple sessions to share a TCP connection, and for large messages to be sent efficiently while not blocking other messages that share the same connection, or even the same MSRP session.
Message and MessageHandler
VNode is a special node that only has virtual address

Structs

MessageType use to customize message, will be handle by custom_message method.
MessageHandler will manage resources.
MessagePayload with sequence and verification, contain MessageRelay.
MessageRelay guide message passing on rings network by relay.
PeerRing is used to help a node interact with other nodes. All nodes in rings network form a clockwise ring in the order of Did. This struct takes its name from that. PeerRing implemented Chord algorithm. PeerRing implemented ChordStorage protocol.
StorageInstance struct
Wrap libsecp256k1::SecretKey.
Session contain signature which sign with Signer, so need AuthorizedInfo as well.
Manager about Session.
The transports and dht management.
Creates a SwarmBuilder to configure a Swarm.
DefaultTransport use for node.

Enums

A enum about Encrypted and Plain types.
A collection MessageType use for unified management.
RTCIceConnectionState indicates signaling state of the ICE Connection.
we support both EIP191 and raw ECDSA singing format.

Traits

ChordStorageInterface should imply necessary method for DHT storage
A custom IceTransportInterface used in ring-core.
Trait of message callback.
MessageListener trait implement listen method, use for MessageHandler and wait message.
SubringInterface should imply necessary operator for DHT Subring

Attribute Macros