Skip to main content

Reference

Trait Reference 

Source
pub trait Reference {
    // Required methods
    fn broadcast(&self) -> Option<&Relative>;
    fn track<'a>(&'a self, id: &'a str) -> &'a str;
}
Expand description

Where a catalog entry’s track lives: the broadcast that publishes it and its name there.

An entry’s key in the catalog is its ID. The track it names is track when set and the ID otherwise, in broadcast when set and the catalog’s own broadcast otherwise. Every reader subscribes through track so the two never diverge.

Required Methods§

Source

fn broadcast(&self) -> Option<&Relative>

The broadcast publishing the track, relative to the catalog’s; None is the catalog’s own.

Source

fn track<'a>(&'a self, id: &'a str) -> &'a str

The track’s name in its broadcast, given this entry’s ID.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§