Weave documentation
Rust referenceweave-swarm

weave-swarm · priority

Source declarations, signatures and documentation for priority.

Source: sigil/weave/network/weave-swarm/src/priority.rs. SHA-256: 49c235965f551e48fa33f768b27812707faaa928fd6ef0477ee1abd87868e787.

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.

priority::Priority

Connection priority

#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub struct Priority {
/// Explicit priority set by user (0-255, higher is better)

pub explicit: u8,
/// Number of shared topics (0-255)

pub shared_topics: u8,
/// Retry count (0-255, lower is better)

pub retries: u8
}

Source line: 8.

priority::Priority::new

Create a new priority

pub fn new(explicit: u8, shared_topics: u8, retries: u8) -> Self;

Source line: 21.

priority::Priority::high

High priority

pub fn high() -> Self;

Source line: 39.

priority::Priority::low

Low priority

pub fn low() -> Self;

Source line: 48.

priority::Priority::after_retry

Decrease priority after retry

pub fn after_retry(mut self) -> Self;

Source line: 57.

priority::Priority::with_shared_topics

Update shared topics count

pub fn with_shared_topics(mut self, count: usize) -> Self;

Source line: 63.

On this page