Struct devices::virtio::ipc_memory_mapper::IpcMemoryMapper
source · pub struct IpcMemoryMapper {
request_tx: Tube,
response_rx: Tube,
endpoint_id: u32,
}
Expand description
Sends an addr translation request to another process using Tube
, and
gets the translated addr from another Tube
Fields§
§request_tx: Tube
§response_rx: Tube
§endpoint_id: u32
Implementations§
source§impl IpcMemoryMapper
impl IpcMemoryMapper
sourcepub fn new(request_tx: Tube, response_rx: Tube, endpoint_id: u32) -> Self
pub fn new(request_tx: Tube, response_rx: Tube, endpoint_id: u32) -> Self
Returns a new IpcMemoryMapper
instance.
§Arguments
request_tx
- A tube to sendTranslateRequest
to another process.response_rx
- A tube to receiveOption<Vec<MemRegion>>
endpoint_id
- For the remote iommu to identify the device/ipc mapper.
fn do_request(&self, req: IommuRequest) -> Result<IommuResponse>
sourcepub fn start_export_session(&mut self) -> Result<Event>
pub fn start_export_session(&mut self) -> Result<Event>
Trait Implementations§
source§impl AsRawDescriptors for IpcMemoryMapper
impl AsRawDescriptors for IpcMemoryMapper
source§fn as_raw_descriptors(&self) -> Vec<RawDescriptor>
fn as_raw_descriptors(&self) -> Vec<RawDescriptor>
Returns the underlying raw descriptors. Read more
Auto Trait Implementations§
impl RefUnwindSafe for IpcMemoryMapper
impl Send for IpcMemoryMapper
impl Sync for IpcMemoryMapper
impl Unpin for IpcMemoryMapper
impl UnwindSafe for IpcMemoryMapper
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.