From 69f1b8f726fb30b3628c2449bee7bee939801210 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 1 Jul 2021 21:12:07 +0000 Subject: deploy: 9f025e829ab6ed468cfb51d72ac105624afc3851 --- kvm_rs/struct.UserMem.html | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'kvm_rs/struct.UserMem.html') diff --git a/kvm_rs/struct.UserMem.html b/kvm_rs/struct.UserMem.html index 92ec687..f503d8f 100644 --- a/kvm_rs/struct.UserMem.html +++ b/kvm_rs/struct.UserMem.html @@ -1,29 +1,29 @@ -kvm_rs::UserMem - Rust +UserMem in kvm_rs - Rust -

Struct kvm_rs::UserMem[][src]

pub struct UserMem { /* fields omitted */ }

Wrapper to safely allocate memory for guest VMs.

+

Struct kvm_rs::UserMem[][src]

pub struct UserMem { /* fields omitted */ }

Wrapper to safely allocate memory for guest VMs.

The underlying memory is freed automatically once the UserMem instance is dropped.

Memory can be mapped into a guest VM with -Vm::set_user_memory_region.

-

Implementations

impl UserMem[src]

pub fn new(len: usize) -> Result<UserMem>[src]

Allocate a zero-initialized memory region of len bytes.

-

pub fn with_init(len: usize, init_from: &[u8]) -> Result<UserMem>[src]

Allocate a zero-initialized memory region of len bytes and initialize the first bytes +Vm::set_user_memory_region.

+

Implementations

impl UserMem[src]

pub fn new(len: usize) -> Result<UserMem>[src]

Allocate a zero-initialized memory region of len bytes.

+

pub fn with_init(len: usize, init_from: &[u8]) -> Result<UserMem>[src]

Allocate a zero-initialized memory region of len bytes and initialize the first bytes with init_from.

Panics

Panics if init_from is larger than the memory size len.

-

pub fn load(&mut self, addr: PhysAddr, data: &[u8])[src]

Load the bytes stored in data into memory at physical address addr.

+

pub fn load(&mut self, addr: PhysAddr, data: &[u8])[src]

Load the bytes stored in data into memory at physical address addr.

Panics

Panics if addr + data.len is larger than the memory size len.

-

Trait Implementations

impl AsMut<[u8]> for UserMem[src]

impl AsRef<[u8]> for UserMem[src]

impl Drop for UserMem[src]

fn drop(&mut self)[src]

Free underlying memory.

-

Auto Trait Implementations

impl RefUnwindSafe for UserMem

impl !Send for UserMem

impl !Sync for UserMem

impl Unpin for UserMem

impl UnwindSafe for UserMem

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.

-
+

Trait Implementations

impl AsMut<[u8]> for UserMem[src]

impl AsRef<[u8]> for UserMem[src]

impl Drop for UserMem[src]

fn drop(&mut self)[src]

Free underlying memory.

+

Auto Trait Implementations

impl RefUnwindSafe for UserMem

impl !Send for UserMem

impl !Sync for UserMem

impl Unpin for UserMem

impl UnwindSafe for UserMem

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.

+
\ No newline at end of file -- cgit v1.2.3