Weave documentation
Filament referencefilament-transport

filament-transport · path_discovery

Source declarations, signatures and documentation for path_discovery.

Read the current implementation boundaries before integration. This reference reproduces declarations; it omits source comments whose examples or readiness claims have not been verified.

Source: sigil/weave/filament/filament-transport/src/path_discovery.rs. SHA-256: f263c5317eda35023f5783f0fda357a2e110b490f4eccbf8d491740f2828cfe4.

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.

path_discovery::PathRequest

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PathRequest {
/// Destination being queried.

pub destination: DestinationHash,
/// Request ID for matching responses.

pub request_id: [u8; 16],
/// Number of hops traversed.

pub hops: u8,
/// Timestamp when request was created.

pub created_at: Instant
}

Source line: 16.

path_discovery::PathRequest::new

#[must_use]
pub fn new(destination: DestinationHash) -> Self;

Source line: 33.

path_discovery::PathRequest::increment_hops

pub fn increment_hops(&mut self);

Source line: 46.

path_discovery::PathRequest::is_expired

#[must_use]
pub fn is_expired(&self, timeout: Duration) -> bool;

Source line: 52.

path_discovery::PathResponse

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct PathResponse {
/// Request ID this responds to.

pub request_id: [u8; 16],
/// Destination from the request.

pub destination: DestinationHash,
/// Number of hops to destination.

pub hops: u8,
/// Interface to use for reaching destination.

pub interface: String,
/// Next hop destination.

pub next_hop: DestinationHash,
/// Timestamp when path was learned.

pub timestamp: Instant
}

Source line: 59.

path_discovery::PathResponse::from_path_entry

#[must_use]
pub fn from_path_entry(request_id: [u8; 16], entry: &PathEntry) -> Self;

Source line: 82.

path_discovery::PathDiscovery

pub struct PathDiscovery {

}

Source line: 95.

path_discovery::PathDiscovery::new

#[must_use]
pub fn new(routing_table: Arc<RoutingTable>) -> Self;

Source line: 112.

path_discovery::PathDiscovery::request_path

pub async fn request_path(&self, destination: DestinationHash) -> Result<PathRequest>;

Source line: 126.

path_discovery::PathDiscovery::handle_request

pub async fn handle_request(&self, request: PathRequest) -> Option<PathResponse>;

Source line: 158.

path_discovery::PathDiscovery::handle_response

pub async fn handle_response(&self, response: PathResponse) -> Result<bool>;

Source line: 178.

path_discovery::PathDiscovery::cleanup_expired

pub async fn cleanup_expired(&self);

Source line: 218.

path_discovery::PathDiscovery::pending_count

pub async fn pending_count(&self) -> usize;

Source line: 233.

path_discovery::PathDiscovery::set_timeout

pub fn set_timeout(&mut self, timeout: Duration);

Source line: 238.

path_discovery::hex::encode

pub fn encode(bytes: impl AsRef<[u8]>) -> String;

Source line: 245.

On this page