#[non_exhaustive]#[repr(u16)]pub enum HypercallAddress {
Show 13 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,
}
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
FileUnlink = 2_112
Port address = 0x840
Trait Implementations§
source§impl Debug for HypercallAddress
impl Debug for HypercallAddress
source§impl From<Hypercall<'_>> for HypercallAddress
impl From<Hypercall<'_>> for HypercallAddress
source§impl PartialEq for HypercallAddress
impl PartialEq for HypercallAddress
source§fn eq(&self, other: &HypercallAddress) -> bool
fn eq(&self, other: &HypercallAddress) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl TryFrom<u16> for HypercallAddress
impl TryFrom<u16> for HypercallAddress
§type Error = TryFromPrimitiveError<HypercallAddress>
type Error = TryFromPrimitiveError<HypercallAddress>
The type returned in the event of a conversion error.
source§impl TryFromPrimitive for HypercallAddress
impl TryFromPrimitive for HypercallAddress
type Primitive = u16
type Error = TryFromPrimitiveError<HypercallAddress>
const NAME: &'static str = "HypercallAddress"
fn try_from_primitive( number: Self::Primitive ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Eq for HypercallAddress
impl StructuralPartialEq for HypercallAddress
Auto Trait Implementations§
impl Freeze for HypercallAddress
impl RefUnwindSafe for HypercallAddress
impl Send for HypercallAddress
impl Sync for HypercallAddress
impl Unpin for HypercallAddress
impl UnwindSafe for HypercallAddress
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