Struct gdbstub::target::ext::base::GdbInterrupt[][src]

pub struct GdbInterrupt<'a> { /* fields omitted */ }
Expand description

A handle to check for incoming GDB interrupts.

At the moment, checking for incoming interrupts requires periodically polling for pending interrupts. e.g:

let interrupts = gdb_interrupt.no_async();
loop {
    if interrupts.pending() {
        return Ok(StopReason::GdbInterrupt)
    }

    // execute some number of clock cycles
    for _ in 0..1024 {
        match self.system.step() { .. }
    }
}

There is an outstanding issue to add a non-blocking interface to GdbInterrupt (see daniel5151/gdbstub#36). Please comment on the issue if this is something you’d like to see implemented and/or would like to help out with!

Implementations

impl<'a> GdbInterrupt<'a>[src]

pub fn no_async(self) -> GdbInterruptNoAsync<'a>[src]

Returns a GdbInterruptNoAsync struct which can be polled using a simple non-blocking pending(&mut self) -> bool method.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for GdbInterrupt<'a>

impl<'a> !Send for GdbInterrupt<'a>

impl<'a> !Sync for GdbInterrupt<'a>

impl<'a> Unpin for GdbInterrupt<'a>

impl<'a> !UnwindSafe for GdbInterrupt<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

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

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

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

Performs the conversion.