Skip to main content

Module network

Module network 

Expand description

Network state and peer observation API traits. Network layer abstractions: peer connectivity, health, and stream control.

  • NetworkView — read-only view of network state (connected peers, health, addresses, event subscription)
  • NetworkStreamControl — opening and accepting network streams
  • Health — network health indicator (Red → Green spectrum)

Modules§

traits
Network state and stream-control traits.
types
Shared network event and health types.

Structs§

BoundedVec
Wrapper for Vec that has an explicit upper bound on the number of elements. The Structure remains heap-allocated to avoid blowing up the size of types where it is used.
HealthIter
An iterator over the variants of Health
PeerId
Identifier of a peer of the network.

Enums§

Health
Network health represented with colors, where green is the best and red is the worst possible observed network quality.
NetworkEvent
Events generated by the network for external consumption.

Traits§

NetworkStreamControl
Control object for the opening and receiving of network connections in the form of network streams.
NetworkView
Trait representing a read-only view of the network state.

Type Aliases§

BoxedProcessFn
Type alias for a boxed function returning a boxed future.
PathId
Identifier for a path traversed using an allowed DestinationRouting over the network.