fuchsia_runtime

Enum HandleType

Source
#[non_exhaustive]
#[repr(u8)]
pub enum HandleType {
Show 28 variants ProcessSelf = 1, ThreadSelf = 2, DefaultJob = 3, RootVmar = 4, LoadedVmar = 5, LdsvcLoader = 16, VdsoVmo = 17, StackVmo = 19, ExecutableVmo = 20, BootdataVmo = 26, BootfsVmo = 27, KernelFileVmo = 28, ComponentConfigVmo = 29, NamespaceDirectory = 32, FileDescriptor = 48, Lifecycle = 58, DirectoryRequest = 59, EscrowedDictionary = 60, Resource = 63, ClockUtc = 64, MmioResource = 80, IrqResource = 81, IoportResource = 82, SmcResource = 83, SystemResource = 84, User0 = 240, User1 = 241, User2 = 242,
}
Expand description

Handle types as defined by the processargs protocol.

See //zircon/system/public/zircon/processargs.h for canonical definitions.

Short descriptions of each handle type are given, but more complete documentation may be found in the processargs.h header.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ProcessSelf = 1

Handle to our own process.

Equivalent to PA_PROC_SELF.

§

ThreadSelf = 2

Handle to the initial thread of our own process.

Equivalent to PA_THREAD_SELF.

§

DefaultJob = 3

Handle to a job object which can be used to make child processes.

The job can be the same as the one used to create this process or it can be different.

Equivalent to PA_JOB_DEFAULT.

§

RootVmar = 4

Handle to the root of our address space.

Equivalent to PA_VMAR_ROOT.

§

LoadedVmar = 5

Handle to the VMAR used to load the initial program image.

Equivalent to PA_VMAR_LOADED.

§

LdsvcLoader = 16

Service for loading shared libraries.

See fuchsia.ldsvc.Loader for the interface definition.

Equivalent to PA_LDSVC_LOADER.

§

VdsoVmo = 17

Handle to the VMO containing the vDSO ELF image.

Equivalent to PA_VMO_VDSO.

§

StackVmo = 19

Handle to the VMO used to map the initial thread’s stack.

Equivalent to PA_VMO_STACK.

§

ExecutableVmo = 20

Handle to the VMO for the main executable file.

Equivalent to PA_VMO_EXECUTABLE.

§

BootdataVmo = 26

Used by kernel and userboot during startup.

Equivalent to PA_VMO_BOOTDATA.

§

BootfsVmo = 27

Used by kernel and userboot during startup.

Equivalent to PA_VMO_BOOTFS.

§

KernelFileVmo = 28

Used by the kernel to export debug information as a file in bootfs.

Equivalent to PA_VMO_KERNEL_FILE.

§

ComponentConfigVmo = 29

A Handle to a component’s process’ configuration VMO.

Equivalent to PA_VMO_COMPONENT_CONFIG.

§

NamespaceDirectory = 32

A handle to a fuchsia.io.Directory service to be used as a directory in the process’s namespace. Corresponds to a path in the processargs bootstrap message’s namespace table based on the argument of a HandleInfo of this type.

Equivalent to PA_NS_DIR.

§

FileDescriptor = 48

A handle which will be used as a file descriptor.

Equivalent to PA_FD.

§

Lifecycle = 58

A Handle to a channel on which the process may serve the the |fuchsia.process.Lifecycle| protocol.

Equivalent to PA_LIFECYCLE.

§

DirectoryRequest = 59

Server endpoint for handling connections to a process’s outgoing directory.

Equivalent to PA_DIRECTORY_REQUEST.

§

EscrowedDictionary = 60

A |fuchsia.component.sandbox/Dictionary| client endpoint where the process may find a dictionary that it has stowed away earlier via |fuchsia.process.Lifecycle/OnEscrow|.

Equivalent to PA_ESCROWED_DICTIONARY.

§

Resource = 63

A Handle to a resource object. Used by devcoordinator and devhosts.

Equivalent to PA_RESOURCE.

§

ClockUtc = 64

A Handle to a clock object representing UTC. Used by runtimes to gain access to UTC time.

Equivalent to PA_CLOCK_UTC.

§

MmioResource = 80

A Handle to an MMIO resource object.

Equivalent to PA_MMIO_RESOURCE.

§

IrqResource = 81

A Handle to an IRQ resource object.

Equivalent to PA_IRQ_RESOURCE.

§

IoportResource = 82

A Handle to an IO Port resource object.

Equivalent to PA_IOPORT_RESOURCE.

§

SmcResource = 83

A Handle to an SMC resource object.

Equivalent to PA_SMC_RESOURCE.

§

SystemResource = 84

A Handle to the System resource object.

Equivalent to PA_SYSTEM_RESOURCE.

§

User0 = 240

A handle type with user-defined meaning.

Equivalent to PA_USER0.

§

User1 = 241

A handle type with user-defined meaning.

Equivalent to PA_USER1.

§

User2 = 242

A handle type with user-defined meaning.

Equivalent to PA_USER2.

Trait Implementations§

Source§

impl Clone for HandleType

Source§

fn clone(&self) -> HandleType

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for HandleType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl From<HandleType> for HandleInfo

An implementation of the From trait to create a HandleInfo from a HandleType with an argument of 0.

Source§

fn from(ty: HandleType) -> Self

Converts to this type from the input type.
Source§

impl FromPrimitive for HandleType

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

impl PartialEq for HandleType

Source§

fn eq(&self, other: &HandleType) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for HandleType

Source§

impl Eq for HandleType

Source§

impl StructuralPartialEq for HandleType

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.