pub struct BreakpointSet { /* private fields */ }Expand description
A caller-owned collection of breakpoints, checked by position. Not tied
to any particular crate::Story — the same set can be handed to
consecutive debug_run calls, or across flows compiled from the same
crate::Program.
Implementations§
Source§impl BreakpointSet
impl BreakpointSet
pub fn new() -> Self
Sourcepub fn insert(
&mut self,
container_idx: u32,
offset: usize,
name: impl Into<String>,
) -> BreakpointId
pub fn insert( &mut self, container_idx: u32, offset: usize, name: impl Into<String>, ) -> BreakpointId
Add an enabled breakpoint at (container_idx, offset), returning its
id. An empty name is replaced with a container:offset label so
every breakpoint has something non-empty to report.
Sourcepub fn remove(&mut self, id: BreakpointId) -> bool
pub fn remove(&mut self, id: BreakpointId) -> bool
Remove a breakpoint by id. Returns false if no breakpoint with
that id exists.
Sourcepub fn set_enabled(&mut self, id: BreakpointId, enabled: bool) -> bool
pub fn set_enabled(&mut self, id: BreakpointId, enabled: bool) -> bool
Enable/disable a breakpoint without removing it. Returns false if
no breakpoint with that id exists.
pub fn iter(&self) -> impl Iterator<Item = &Breakpoint>
Trait Implementations§
Source§impl Clone for BreakpointSet
impl Clone for BreakpointSet
Source§fn clone(&self) -> BreakpointSet
fn clone(&self) -> BreakpointSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BreakpointSet
impl Debug for BreakpointSet
Source§impl Default for BreakpointSet
impl Default for BreakpointSet
Source§fn default() -> BreakpointSet
fn default() -> BreakpointSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BreakpointSet
impl RefUnwindSafe for BreakpointSet
impl Send for BreakpointSet
impl Sync for BreakpointSet
impl Unpin for BreakpointSet
impl UnsafeUnpin for BreakpointSet
impl UnwindSafe for BreakpointSet
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