pub struct Frame { /* private fields */ }
Expand description
A single context or attachment inside of a Report
.
Frame
s are organized as a singly linked list, which can be iterated by calling
Report::frames()
. The head contains the current context or attachment, and the tail contains
the root context created by Report::new()
. The next Frame
can be accessed by requesting it
by calling Report::request_ref()
.
Implementations§
source§impl Frame
impl Frame
sourcepub const fn sources(&self) -> &[Self]
pub const fn sources(&self) -> &[Self]
Returns a shared reference to the source of this Frame
.
This corresponds to the Frame
below this one in a Report
.
sourcepub fn sources_mut(&mut self) -> &mut [Self]
pub fn sources_mut(&mut self) -> &mut [Self]
Returns a mutable reference to the sources of this Frame
.
This corresponds to the Frame
below this one in a Report
.
sourcepub fn is<T: Send + Sync + 'static>(&self) -> bool
pub fn is<T: Send + Sync + 'static>(&self) -> bool
Returns if T
is the held context or attachment by this frame.
sourcepub fn downcast_ref<T: Send + Sync + 'static>(&self) -> Option<&T>
pub fn downcast_ref<T: Send + Sync + 'static>(&self) -> Option<&T>
Downcasts this frame if the held context or attachment is the same as T
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Frame
impl !RefUnwindSafe for Frame
impl Send for Frame
impl Sync for Frame
impl Unpin for Frame
impl !UnwindSafe for Frame
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
Mutably borrows from an owned value. Read more