Skip to main content

BreakpointStop

Struct BreakpointStop 

Source
pub struct BreakpointStop {
    pub frames: CrashSnapshot,
    pub span: (u32, u32),
    pub hits: u64,
}
Expand description

One :bp stop, as the host sees it.

Carries no context, no heap and no way back into the runtime — see the module header for why that absence is the point.

Handed to the handler by value, and it must not survive the call. The GcRefs in frames name objects that are live at the instant of the stop; the moment the handler returns, the program runs on and the next allocation may collect any of them. Every other root set in the system is registered with the collector, and this one deliberately is not — the handler holds it for the length of one call, which is the whole window in which no collection can happen (module header). A host that stashes it is keeping a root set the collector cannot see.

Fields§

§frames: CrashSnapshot

The frame chain at the stop, innermost first: frame 0 is the function holding the marker, the last is the program’s entry point.

A CrashSnapshot because it is the same deep copy of the same debug chain, produced by the same walk. Its fault_kind is FaultKind::None, which is the honest answer: nothing went wrong, the program stopped because it was asked to.

§span: (u32, u32)

The :bp marker’s own source span [start, end), so the host can point at the line the program stopped on rather than at the function’s extent.

§hits: u64

How many stops this run has made, counting this one. 1 on the first.

The host’s cheapest way to say “the tenth time round the loop” without keeping its own counter, and the runtime’s already: the count is what decides whether a stop is the first one, which is the only thing the runtime itself does with it.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.