Struct Vcpu
pub struct Vcpu(/* private fields */);Implementations§
§impl Vcpu
impl Vcpu
pub fn raw_handle(&self) -> u32
pub fn raw_handle(&self) -> u32
Return the handle’s integer value.
pub fn into_raw(self) -> u32
pub fn into_raw(self) -> u32
Return the raw handle’s integer value without closing it when self is dropped.
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
pub fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
Returns a HandleRef referring to this handle.
pub fn duplicate(&self, rights: Rights) -> Result<Vcpu, Status>
pub fn duplicate(&self, rights: Rights) -> Result<Vcpu, Status>
Wraps the
zx_handle_duplicate
syscall.
pub fn signal(
&self,
clear_mask: Signals,
set_mask: Signals,
) -> Result<(), Status>
pub fn signal( &self, clear_mask: Signals, set_mask: Signals, ) -> Result<(), Status>
Wraps the
zx_object_signal
syscall.
pub fn wait_one(
&self,
signals: Signals,
deadline: Instant<MonotonicTimeline>,
) -> WaitResult
pub fn wait_one( &self, signals: Signals, deadline: Instant<MonotonicTimeline>, ) -> WaitResult
Wraps the
zx_object_wait_one
syscall.
pub fn wait_async(
&self,
port: &Port,
key: u64,
signals: Signals,
options: WaitAsyncOpts,
) -> Result<(), Status>
pub fn wait_async( &self, port: &Port, key: u64, signals: Signals, options: WaitAsyncOpts, ) -> Result<(), Status>
Wraps the
zx_object_wait_async
syscall.
pub fn get_name(&self) -> Result<Name, Status>
pub fn get_name(&self) -> Result<Name, Status>
Wraps a call to the
zx_object_get_property
syscall for the ZX_PROP_NAME property.
pub fn set_name(&self, name: &Name) -> Result<(), Status>
pub fn set_name(&self, name: &Name) -> Result<(), Status>
Wraps a call to the
zx_object_set_property
syscall for the ZX_PROP_NAME property.
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
pub fn basic_info(&self) -> Result<HandleBasicInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_BASIC topic.
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
pub fn count_info(&self) -> Result<HandleCountInfo, Status>
Wraps the
zx_object_get_info
syscall for the ZX_INFO_HANDLE_COUNT topic.
§impl Vcpu
impl Vcpu
pub fn create(guest: &Guest, entry: usize) -> Result<Vcpu, Status>
pub fn create(guest: &Guest, entry: usize) -> Result<Vcpu, Status>
Create a VCPU, for use with guest that begins execution at entry.
pub fn read_state(&self) -> Result<zx_vcpu_state_t, Status>
pub fn read_state(&self) -> Result<zx_vcpu_state_t, Status>
Read the state of a VCPU.
pub fn write_state(&self, state: &zx_vcpu_state_t) -> Result<(), Status>
pub fn write_state(&self, state: &zx_vcpu_state_t) -> Result<(), Status>
Write the state of a VCPU.
pub fn write_io(&self, state: &zx_vcpu_io_t) -> Result<(), Status>
pub fn write_io(&self, state: &zx_vcpu_io_t) -> Result<(), Status>
Write the result of an IO trap to a VCPU.
Trait Implementations§
§impl AsHandleRef for Vcpu
impl AsHandleRef for Vcpu
§fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
fn as_handle_ref(&self) -> Unowned<'_, NullableHandle>
object_wait_many.Source§impl CompatFrom<Vcpu> for Vcpu
Available on crate feature fuchsia only.
impl CompatFrom<Vcpu> for Vcpu
fuchsia only.Source§fn compat_from(value: Vcpu) -> Vcpu
fn compat_from(value: Vcpu) -> Vcpu
value into a value of this type.Source§impl<E> Encode<WireVcpu, E> for Vcpuwhere
E: HandleEncoder + ?Sized,
impl<E> Encode<WireVcpu, E> for Vcpuwhere
E: HandleEncoder + ?Sized,
Source§fn encode(
self,
encoder: &mut E,
out: &mut MaybeUninit<WireVcpu>,
constraint: <WireVcpu as Constrained>::Constraint,
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut E, out: &mut MaybeUninit<WireVcpu>, constraint: <WireVcpu as Constrained>::Constraint, ) -> Result<(), EncodeError>
Source§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<E> EncodeOption<WireOptionalVcpu, E> for Vcpuwhere
E: HandleEncoder + ?Sized,
impl<E> EncodeOption<WireOptionalVcpu, E> for Vcpuwhere
E: HandleEncoder + ?Sized,
Source§fn encode_option(
this: Option<Vcpu>,
encoder: &mut E,
out: &mut MaybeUninit<WireOptionalVcpu>,
constraint: (),
) -> Result<(), EncodeError>
fn encode_option( this: Option<Vcpu>, encoder: &mut E, out: &mut MaybeUninit<WireOptionalVcpu>, constraint: (), ) -> Result<(), EncodeError>
§impl From<NullableHandle> for Vcpu
impl From<NullableHandle> for Vcpu
§fn from(handle: NullableHandle) -> Vcpu
fn from(handle: NullableHandle) -> Vcpu
§impl From<Vcpu> for NullableHandle
impl From<Vcpu> for NullableHandle
§fn from(x: Vcpu) -> NullableHandle
fn from(x: Vcpu) -> NullableHandle
Source§impl FromWire<WireVcpu> for Vcpu
impl FromWire<WireVcpu> for Vcpu
Source§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireOption<WireOptionalVcpu> for Vcpu
impl FromWireOption<WireOptionalVcpu> for Vcpu
Source§fn from_wire_option(wire: WireOptionalVcpu) -> Option<Vcpu>
fn from_wire_option(wire: WireOptionalVcpu) -> Option<Vcpu>
wire to an option of this type.§impl HandleBased for Vcpu
impl HandleBased for Vcpu
§fn duplicate_handle(&self, rights: Rights) -> Result<Self, Status>
fn duplicate_handle(&self, rights: Rights) -> Result<Self, Status>
§fn replace_handle(self, rights: Rights) -> Result<Self, Status>
fn replace_handle(self, rights: Rights) -> Result<Self, Status>
§fn into_handle(self) -> NullableHandle
fn into_handle(self) -> NullableHandle
§fn from_handle(handle: NullableHandle) -> Self
fn from_handle(handle: NullableHandle) -> Self
§fn into_handle_based<H>(self) -> Hwhere
H: HandleBased,
fn into_handle_based<H>(self) -> Hwhere
H: HandleBased,
§fn from_handle_based<H>(h: H) -> Selfwhere
H: HandleBased,
fn from_handle_based<H>(h: H) -> Selfwhere
H: HandleBased,
fn is_invalid_handle(&self) -> bool
§impl Ord for Vcpu
impl Ord for Vcpu
§impl PartialOrd for Vcpu
impl PartialOrd for Vcpu
impl Eq for Vcpu
impl StructuralPartialEq for Vcpu
Auto Trait Implementations§
impl Freeze for Vcpu
impl RefUnwindSafe for Vcpu
impl Send for Vcpu
impl Sync for Vcpu
impl Unpin for Vcpu
impl UnwindSafe for Vcpu
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
§impl<T> EncodableAsHandle for Twhere
T: HandleBased,
impl<T> EncodableAsHandle for Twhere
T: HandleBased,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T, W> FromWireOption<WireBox<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<WireBox<'_, W>> for Twhere
T: FromWire<W>,
Source§fn from_wire_option(wire: WireBox<'_, W>) -> Option<T>
fn from_wire_option(wire: WireBox<'_, W>) -> Option<T>
wire to an option of this type.Source§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
Source§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to Self