Weave documentation
Rust referenceweave-swarm

weave-swarm · runtime::protocol

Source declarations, signatures and documentation for runtime::protocol.

Source: sigil/weave/network/weave-swarm/src/runtime/protocol.rs. SHA-256: 3249b2214e22a66434fc6be080f1b19d5bc8609fa6e8e905193ba2d22e64f2f5.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

runtime::protocol::ProtocolId

Validated Protocol 1.0 multistream identifier.

#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct ProtocolId(String);

Source line: 20.

runtime::protocol::ProtocolId::parse

pub fn parse(value: &str) -> Result<Self, RuntimeError>;

Source line: 23.

runtime::protocol::ProtocolId::as_str

pub fn as_str(&self) -> &str;

Source line: 44.

runtime::protocol::ProtocolRegistry

Registry frozen before activation; it cannot be mutated through runtime commands.

#[derive(Debug, Clone)]
pub struct ProtocolRegistry {

}

Source line: 51.

runtime::protocol::ProtocolRegistry::new

pub fn new(
        application_protocols: impl IntoIterator<Item = ProtocolId>,
    ) -> Result<Self, RuntimeError>;

Source line: 57.

runtime::protocol::ProtocolRegistry::contains

pub fn contains(&self, protocol: &ProtocolId) -> bool;

Source line: 109.

runtime::protocol::ProtocolRegistry::digest

pub fn digest(&self) -> [u8; 32];

Source line: 113.

runtime::protocol::ProtocolRegistry::iter

pub fn iter(&self) -> impl Iterator<Item = &ProtocolId>;

Source line: 117.

On this page