#[non_exhaustive]pub struct Info {
pub id: Origin,
pub pool: Pool,
pub linger: Duration,
}Expand description
An origin’s identity plus the cache pool its broadcasts inherit.
Doubles as the construction config for an origin Producer and as the
parent handle every broadcast carries (broadcast::Info::origin): the origin owns
the cache::Pool every group in the tree registers with, so a relay configures one
bounded pool here and every broadcast, track, and group beneath it reaches that single
budget by walking up the ownership chain. Defaults to an unbounded pool
(Origin::produce is the shorthand for that). Cheap to clone (a Copy id plus an
Arc-handle bump), so it’s stored by value rather than behind another Arc.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: OriginThe origin’s wire identity, appended to broadcast hop chains for loop detection and shortest-path routing.
pool: PoolThe cache pool broadcasts under this origin register their groups with. It
flows down the ownership chain (origin -> broadcast -> track -> group), so a
group reaches it via track.broadcast.origin.pool. Unbounded by default; a
relay sets a bounded one (via Self::with_pool) so cached groups across the
whole process share one memory budget.
linger: DurationHow long a broadcast under this origin outlives the ungraceful loss of its
last source before closing. Within the window the path stays announced and a
source re-attaching at it (a session reconnecting, a publisher re-announcing)
splices in seamlessly, so consumers never observe the gap. A source that ends
deliberately (broadcast::Producer::finish, a clean unannounce from a peer)
closes the broadcast immediately regardless. Zero (the default) closes
immediately either way; a duration too large to represent as a deadline
(e.g. Duration::MAX) lingers indefinitely.
Implementations§
Source§impl Info
impl Info
Sourcepub fn with_pool(self, pool: Pool) -> Self
pub fn with_pool(self, pool: Pool) -> Self
Set the cache pool this origin’s broadcasts inherit, returning self for chaining.
Sourcepub fn with_linger(self, linger: Duration) -> Self
pub fn with_linger(self, linger: Duration) -> Self
Set how long a broadcast survives ungracefully losing its last source (see
Self::linger), returning self for chaining.