#[repr(C)]pub struct moq_route {
pub hops: *const u64,
pub hops_len: usize,
pub cost: u64,
pub cold: u64,
pub has_cold: bool,
}Expand description
A route advertisement: hops and costs.
Pair with moq_publish_announce or moq_origin_dynamic. Zeroed (NULL hops,
hops_len 0, cost 0) is the default route. hops is borrowed for the duration
of the call that reads it.
cost is the warm price: what pulling via this route costs today, lower
wins. cold is the same path undiscounted; when has_cold is false it
defaults to cost, which is what a publisher seeding its production cost
wants. New fields always append, so a zeroed struct keeps meaning the
defaults.
Fields§
§hops: *const u64Hop ids, oldest first. NULL when hops_len is 0. 0 is the anonymous
mark and is legal on a received chain.
hops_len: usize§cost: u64Preference among routes covering the same prefix: lower wins.
cold: u64The same path with every warm discount removed. Ignored unless has_cold.
has_cold: boolWhether cold applies. When false, cold defaults to cost.