Struct haybale::watchpoints::Watchpoints
source · pub struct Watchpoints(/* private fields */);
Expand description
Stores information about watchpoints and performs operations with them.
External users (that is, haybale
users) probably don’t want to use this
directly - instead, you’re probably looking for the watchpoint-related
methods on State
.
Implementations§
source§impl Watchpoints
impl Watchpoints
sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new Watchpoints
instance with no watchpoints.
To construct a new Watchpoints
instance that contains some initial
watchpoints, note that Watchpoints
implements FromIterator<(String, Watchpoint)>
,
so you can for instance use collect()
with an iterator over (watchpoint
name, watchpoint) pairs.
sourcepub fn add(&mut self, name: impl Into<String>, watchpoint: Watchpoint) -> bool
pub fn add(&mut self, name: impl Into<String>, watchpoint: Watchpoint) -> bool
Add a memory watchpoint. It will be enabled unless/until
disable()
is called on it.
If a watchpoint with the same name was previously added, this will
replace that watchpoint and return true
. Otherwise, this will return
false
.
sourcepub fn remove(&mut self, name: &str) -> bool
pub fn remove(&mut self, name: &str) -> bool
Remove the memory watchpoint with the given name
.
Returns true
if the operation was successful, or false
if no
watchpoint with that name was found.
Trait Implementations§
source§impl Clone for Watchpoints
impl Clone for Watchpoints
source§fn clone(&self) -> Watchpoints
fn clone(&self) -> Watchpoints
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more