[−][src]Struct riscv_emu_rust::device::virtio_block_disk::VirtioBlockDisk
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]
pub fn store(&mut self, address: u64, value: u8)
[src]
Auto Trait Implementations
impl RefUnwindSafe for VirtioBlockDisk
impl Send for VirtioBlockDisk
impl Sync for VirtioBlockDisk
impl Unpin for VirtioBlockDisk
impl UnwindSafe for VirtioBlockDisk
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,