Skip to main content

Crate dht_rpc

Crate dht_rpc 

Source
Expand description

Rust Implementation of the hyperswarm DHT

Modules§

commands
Query Commands

Structs§

BootstrapFuture
Bootstrapped
CommandQuery
Represents an incoming query with a custom command.
CommandQueryResponse
Outgoing response to a CommandQuery
CustomCommandRequest
Custom incoming request to a registered command
DhtConfig
ExternalCommand
IdBytes
A 32 byte identifier for a node participating in the DHT.
InResponse
Recied response data along with metadata
Node
OutRequestBuilder
Peer
PeerId
PeriodicJob
QueryArgs
QueryId
Unique identifier for an active query.
QueryNext
QueryResult
The result of a Query.
ReplyMsgData
ReplyMsgData is the Reply data structure that is encoded to/from bytes
RequestMsgData
RequestMsgData is the Request data structure that is encoded to/from bytes
RequestMsgDataInner
Rpc
RpcDhtRequestFuture
A future that polls RpcDht for events while waiting for a specific response.
RpcInner
RpcInnerBuilder
Builder for RpcInner.

Enums§

Command
TODO This is encoded as u8 which might not always be true
Commit
The kinds of Commit a Query can have.
Error
InternalCommand
TODO in js this is de/encoded with c.uint which is for a variable sized unsigned integer.
RequestError
ResponseError
ResponseOk
RpcEvent
RpcInnerBuilderError
Error type for RpcInnerBuilder

Constants§

DEFAULT_BOOTSTRAP
The publicly available hyperswarm DHT addresses
IMMUTABLE_STORE_CMD
The command identifier for immutable storage
MUTABLE_STORE_CMD
The command identifier for Mutable storage
PEERS_CMD
The command identifier to (un)announce/lookup peers

Functions§

fill_random_bytes
Fill the slice with random bytes
generic_hash

Type Aliases§

ResponseResult
Result
Tid