[][src]Struct riscv_emu_rust::device::virtio_block_disk::VirtioBlockDisk

pub struct VirtioBlockDisk { /* fields omitted */ }

Emulates Virtio Block device. Refer to the specification for the detail. It follows legacy API.

Implementations

impl VirtioBlockDisk[src]

pub fn new() -> Self[src]

Creates a new VirtioBlockDisk.

pub fn is_interrupting(&mut self) -> bool[src]

Indicates whether VirtioBlockDisk raises an interrupt signal

pub fn init(&mut self, contents: Vec<u8>)[src]

Initializes filesystem content. The method is expected to be called only up to once.

Arguments

  • contents filesystem content binary

pub fn tick(&mut self, memory: &mut MemoryWrapper)[src]

Runs one cycle. Data transfer between main memory and block device can happen depending on condition.

Arguments

  • memory

pub fn load(&mut self, address: u64) -> u8[src]

Loads register content

Arguments

  • address

pub fn store(&mut self, address: u64, value: u8)[src]

Stores register content

Arguments

  • address
  • value

Auto Trait Implementations

Blanket Implementations

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

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

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

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

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

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.

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.