pub trait RiscvInterfaceBuilder<'probe> {
    // Required methods
    fn create_state(&self) -> RiscvDebugInterfaceState;
    fn attach<'state>(
        self: Box<Self>,
        state: &'state mut RiscvDebugInterfaceState
    ) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>
       where 'probe: 'state;
}
Expand description

A single-use factory for creating RISC-V communication interfaces and their states.

Required Methods§

source

fn create_state(&self) -> RiscvDebugInterfaceState

Creates a new RISC-V communication interface state object.

The state object needs to be stored separately from the communication interface and can be used to restore the state of the interface at a later time.

source

fn attach<'state>( self: Box<Self>, state: &'state mut RiscvDebugInterfaceState ) -> Result<RiscvCommunicationInterface<'state>, DebugProbeError>
where 'probe: 'state,

Consumes the factory and creates a communication interface object initialised with the given state.

Implementors§