pub struct DebugOverlay { /* private fields */ }Expand description
A debug overlay with a bottom bar and detail panels.
The bar shows a short summary for each enabled category. Clicking a section toggles a panel above the bar with all figures and their sparklines. Several panels can be open at once.
Implementations§
Source§impl DebugOverlay
impl DebugOverlay
Sourcepub fn new(categories: &[StatCategory]) -> Self
pub fn new(categories: &[StatCategory]) -> Self
Creates an overlay with the given categories enabled, all collapsed.
Sourcepub fn set_link(&mut self, lines: Vec<String>)
pub fn set_link(&mut self, lines: Vec<String>)
Sets the link details shown in a player’s NET section.
The section already shows whether the path goes through an iroh relay and the rate media arrives at, from the player’s network sample. These lines add what the player does not know, such as addresses. The first line also joins the section summary.
Sourcepub fn any_expanded(&self) -> bool
pub fn any_expanded(&self) -> bool
Returns whether any detail panel is open.
Sourcepub fn show_player(&mut self, ui: &mut Ui, video_rect: Rect, player: &Player)
pub fn show_player(&mut self, ui: &mut Ui, video_rect: Rect, player: &Player)
Draws the overlay for player at the bottom of video_rect.
Shows the enabled NET, RENDER, AUDIO, and TIME categories. Reads the player’s timeline only while the TIME panel is open.
Sourcepub fn show_broadcast(
&mut self,
ui: &mut Ui,
video_rect: Rect,
broadcast: &LocalBroadcast,
)
pub fn show_broadcast( &mut self, ui: &mut Ui, video_rect: Rect, broadcast: &LocalBroadcast, )
Draws the overlay for a local broadcast at the bottom of video_rect.
Shows the enabled CAPTURE and NET categories. The publish side has no link figures, so NET shows the encoded video bitrate summed over all renditions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DebugOverlay
impl RefUnwindSafe for DebugOverlay
impl Send for DebugOverlay
impl Sync for DebugOverlay
impl Unpin for DebugOverlay
impl UnsafeUnpin for DebugOverlay
impl UnwindSafe for DebugOverlay
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more