Expand description
A prelude is provided which imports all the important data types and traits of ring-network.
Re-exports§
pub use rings_core;pub use self::rings_core::prelude::base58;pub use self::rings_core::prelude::uuid;
Modules§
- chunk
- Message framing / chunking. A message larger than the connection’s negotiated
max_message_sizeis split into MTU-sizedChunks on the sender and reassembled on the receiver. - entry
- Storage entry model used by Chord-backed DHT storage.
- message
- Message and MessageHandler
Structs§
- Custom
Message - MessageType use to customize message, will be handle by
custom_messagemethod. - Message
Handler - Shared message-handler handle.
- Message
Payload MessagePayloadis used to transmit data between nodes. The data should be packed by Transaction.- Message
Relay - MessageRelay guide message passing on rings network by relay.
- Peer
Ring - 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.
- Secret
Key - Wrap libsecp256k1::SecretKey. which is a A 256-bit scalar value, present as [u32; 4]
- Session
- Session is used to verify the message. It’s serializable and can be attached to the message payload.
- Session
Sk - SessionSk holds the Session and its session private key. To prove that the message was sent by the Account of Session, we need to attach session and the signature signed by sk to the payload.
- Session
SkBuilder - SessionSkBuilder is used to build a SessionSk.
- Swarm
- The transport and dht management.
- Swarm
Builder - Creates a SwarmBuilder to configure a Swarm.
Enums§
- Message
- A collection MessageType use for unified management.
Traits§
- Chord
Storage Interface - ChordStorageInterface should imply necessary method for DHT storage
- Chord
Storage Interface Cache Checker - ChordStorageInterfaceCacheChecker defines the interface for checking the local cache of the DHT.
- Payload
Sender - Trait of PayloadSender
- Subring
Interface - SubringInterface should imply necessary operator for DHT Subring
Attribute Macros§
- async_
trait - wasm_
export - If the feature is not “wasm”, the macro does nothing; otherwise, it calls wasm_bindgen. wasm_export does not work for Js Class. To export a class to js, you should use wasm_bindgen or __wasm_bindgen_class_marker. ref: https://docs.rs/wasm-bindgen-macro/0.2.86/src/wasm_bindgen_macro/lib.rs.html#51