Skip to main content

EndpointDescriptor

Struct EndpointDescriptor 

Source
#[repr(C)]
pub struct EndpointDescriptor { pub fn_ptr: fn(u64) -> u64, pub index: u8, pub arg_registers: u8, pub arg_cnode_size: u8, pub _pad: [u8; 5], }
Expand description

Descriptor written into the .subsoil.endpoints ELF section by the endpoint attribute macro. The JAVM transpiler reads this section at link time and uses each entry to populate the chain Image’s endpoints: BTreeMap<u8, EndpointDef> field.

Layout is #[repr(C)] so the transpiler can decode the section as a flat array of fixed-size records. On RISC-V64 the function pointer occupies 8 bytes, followed by 8 bytes of metadata, for a total stride of 16 bytes.

Fields§

§fn_ptr: fn(u64) -> u64

RISC-V address of the endpoint function. The transpiler maps this to a PVM PC via its instruction-mapping table.

§index: u8

Endpoint index (key in the chain Image’s endpoints map).

§arg_registers: u8

Caller-supplied register-arg count (per Image::EndpointDef).

§arg_cnode_size: u8

Caller-supplied arg-cnode size (per Image::EndpointDef).

§_pad: [u8; 5]

Reserved for alignment / future expansion.

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