Trait emulator_hal::Inspect

source ·
pub trait Inspect<Address, Bus, Writer>
where Address: Copy, Bus: BusAccess<Address>, Writer: Write,
{ type InfoType; type Error; // Required methods fn inspect( &mut self, info: Self::InfoType, bus: &mut Bus, writer: &mut Writer ) -> Result<(), Self::Error>; fn brief_summary( &mut self, bus: &mut Bus, writer: &mut Writer ) -> Result<(), Self::Error>; fn detailed_summary( &mut self, bus: &mut Bus, writer: &mut Writer ) -> Result<(), Self::Error>; }
Expand description

Inspect the state of a device, and emit it to an object that implements fmt::Write

Required Associated Types§

source

type InfoType

A type that describes the types of information or state that this device can emit

source

type Error

A type that is returned if the data cannot be written as expected

Required Methods§

source

fn inspect( &mut self, info: Self::InfoType, bus: &mut Bus, writer: &mut Writer ) -> Result<(), Self::Error>

Write the given information type to the given writer, or return an error

source

fn brief_summary( &mut self, bus: &mut Bus, writer: &mut Writer ) -> Result<(), Self::Error>

Write a brief summary of the device’s current state to the given writer, or return an error

source

fn detailed_summary( &mut self, bus: &mut Bus, writer: &mut Writer ) -> Result<(), Self::Error>

Write a detailed summary of the device’s current state to the given writer, or return an error

Implementors§