Enum HypercallAddress

Source
#[non_exhaustive]
#[repr(u16)]
pub enum HypercallAddress {
Show 14 variants FileWrite = 1_024, FileOpen = 1_088, FileClose = 1_152, FileRead = 1_280, Exit = 1_344, FileLseek = 1_408, Netwrite = 1_600, Netread = 1_664, Netstat = 1_792, Cmdsize = 1_856, Cmdval = 1_920, Uart = 2_048, FileUnlink = 2_112, SerialBufferWrite = 2_176,
}
Expand description

Enum containing all valid port mappings for hypercalls.

The discriminants of this enum are the respective ports, so one can get the code by calling e.g., HypercallPorts::FileWrite as u16.

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.
§

FileWrite = 1_024

Port address = 0x400

§

FileOpen = 1_088

Port address = 0x440

§

FileClose = 1_152

Port address = 0x480

§

FileRead = 1_280

Port address = 0x500

§

Exit = 1_344

Port address = 0x540

§

FileLseek = 1_408

Port address = 0x580

§

Netwrite = 1_600

👎Deprecated: was never really in use

Port address = 0x640

§

Netread = 1_664

👎Deprecated: was never really in use

Port address = 0x680

§

Netstat = 1_792

👎Deprecated: was never really in use

Port address = 0x700

§

Cmdsize = 1_856

Port address = 0x740

§

Cmdval = 1_920

Port address = 0x780

§

Uart = 2_048

Port address = 0x800

Port address = 0x840

§

SerialBufferWrite = 2_176

Port address = 0x880

Trait Implementations§

Source§

impl Clone for HypercallAddress

Source§

fn clone(&self) -> HypercallAddress

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 HypercallAddress

Source§

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

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

impl From<&Hypercall<'_>> for HypercallAddress

Source§

fn from(value: &Hypercall<'_>) -> Self

Converts to this type from the input type.
Source§

impl From<Hypercall<'_>> for HypercallAddress

Source§

fn from(value: Hypercall<'_>) -> Self

Converts to this type from the input type.
Source§

impl Hash for HypercallAddress

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for HypercallAddress

Source§

fn eq(&self, other: &HypercallAddress) -> 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 TryFrom<u16> for HypercallAddress

Source§

type Error = TryFromPrimitiveError<HypercallAddress>

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

fn try_from(number: u16) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for HypercallAddress

Source§

impl Copy for HypercallAddress

Source§

impl Eq for HypercallAddress

Source§

impl StructuralPartialEq for HypercallAddress

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, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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, 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.