Crate ant_networking

Source

Modules§

target_arch

Structs§

GetRecordCfg
The various settings to apply to when fetching a record from network
Instant
A measurement of a monotonically nondecreasing clock. Opaque and useful only with Duration.
Interval
Wasm32 target arch does not support time or spawning via tokio so we shim in alternatives here when building for that architecture Interval returned by interval and interval_at.
Network
API to interact with the underlying Swarm
NetworkBuilder
NodeRecordStore
A RecordStore that stores records on disk.
PutRecordCfg
The various settings related to writing a record to the network.
SwarmDriver
SwarmLocalState
Snapshot of information kept in the Swarm’s local state

Enums§

GetRecordError
GetRecord Query errors
MsgResponder
Channel to send the Response through.
NetworkError
Network Errors
NetworkEvent
Events forwarded by the underlying Network; to be used by the upper layers
NodeIssue
VerificationKind
The methods in which verification on a PUT can be carried out.

Constants§

MAX_PACKET_SIZE
What is the largest packet to send over the network. Records larger than this will be rejected.

Functions§

close_group_majority
Majority of a given group (i.e. > 1/2).
get_quorum_value
Get the value of the provided Quorum
get_transactions_from_record
interval
Wasm32 target arch does not support time or spawning via tokio so we shim in alternatives here when building for that architecture Creates new Interval that yields with interval of period. The first tick completes immediately. The default MissedTickBehavior is Burst, but this can be configured by calling set_missed_tick_behavior.
multiaddr_is_global
Verifies if Multiaddr contains IPv4 address that is not global. This is used to filter out unroutable addresses from the Kademlia routing table.
sleep
Wasm32 target arch does not support time or spawning via tokio so we shim in alternatives here when building for that architecture Waits until duration has elapsed.
sort_peers_by_address
Sort the provided peers by their distance to the given NetworkAddress. Return with the closest expected number of entries if has.
sort_peers_by_key
Sort the provided peers by their distance to the given KBucketKey. Return with the closest expected number of entries if has.
spawn
Wasm32 target arch does not support time or spawning via tokio so we shim in alternatives here when building for that architecture Spawns a new asynchronous task, returning a JoinHandle for it.